| Article: |
XML Data Binding with Castor | |
| Subject: | good, clear explanations | |
| Date: | 2001-11-02 05:19:52 | |
| From: | insync | |
| too bad the castor jars are so big | ||
Showing messages 1 through 1 of 1.
-
good, clear explanations
2004-04-05 09:26:12 lyl000 [View]



your method can get data from xml,but if I get xml data from database ,then put it into a string,How I can trans it into javaBean?
eg:
String aa="<person>
<name>Michael Owen</name>
<address>222 Bazza Lane, Liverpool, MN</address>
<ssn>111-222-3333</ssn>
<email>michael@owen.com</email>
<home-phone>720.111.2222</home-phone>
<work-phone>111.222.3333</work-phone>
</person>
",I can't use :Person person = (Person)
Unmarshaller.unmarshal(Person.class,
new FileReader("person.xml"));
I can get the framework use: mapping.loadMapping("mapping.xml");
can I put my String into the bean but put into an xml first.
thank you