Hi guys,
I have a question which I have struggled four hours without solution, can anyone kindly give some advice, now it is busy exam time and i don't have more time for figuring this out.
I have an example xml file as follows:
<?xml version='1.0' encoding='UTF-8'?>
<
test>
<book>
<title>learn
java</title>
<author>tina</author>
</book>
<book>
<title>c++</title>
<author>peter</author>
</book>
</test>
I convert the TestElement
(<test>
<book>
<title>learn java</title>
<author>tina</author>
</book>
<book>
<title>c++</title>
<author>peter</author>
</book>
</test>
into a
String and save the string in a table of MYSQL, but when I extract the String out of the table, I don't know how to convert it back as an element of xml file. I build a new XML file, tried to add the String as an element but failed, so the String can't be parsed as an Element.
Then I convert the whole xml file as a String and tried to save it into a table, but got error message. Seems db has problem to save the first line of xml file which is <?xml version='1.0' encoding='UTF-8'?>.
It's kind of urgent, Thanks a lot for any help!!
[ April 11, 2006: Message edited by: marshal ma ]