read in xml instance and submit

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

read in xml instance and submit

JohnBampton
I am reading in the xml instance and I have no trouble getting individual element values from it.

Document queryDocument = xmlReader.read(request.getInputStream())

But I want to submit the whole document into a database and when I try to insert the querydocument document all the gets inserted is a string something like - "org.dom4j.defaultdocument"  instead of the actual xml

Does anyone know how to do this?
Reply | Threaded
Open this post in threaded view
|

RE: read in xml instance and submit

Steve Bayliss
I'm assuming you want the document as a string?

In which case you will need to serialize it - try the asXML() method to do
this.

Though in which case no need to construct the queryDocument in the first
place - you can just get the string from the input stream directly (unless
there's other things you need the queryDocument for).

Steve


-----Original Message-----
From: JohnBampton [mailto:[hidden email]]
Sent: 06 February 2010 08:58
To: [hidden email]
Subject: [ops-users] read in xml instance and submit



I am reading in the xml instance and I have no trouble getting individual
element values from it.

Document queryDocument = xmlReader.read(request.getInputStream())

But I want to submit the whole document into a database and when I try to
insert the querydocument document all the gets inserted is a string
something like - "org.dom4j.defaultdocument"  instead of the actual xml

Does anyone know how to do this?
--
View this message in context:
http://n4.nabble.com/read-in-xml-instance-and-submit-tp1471121p1471121.html
Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws