Did you try saving it with this option: XmlOptions.setSaveSyntheticDocumentElement (QName name) ?

Cezar

 


From: Nathaniel Auvil [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 09, 2006 12:06 PM
To: [email protected]
Subject: including top level element in xml text

 

How can i have the XmlObject.xmlText() method output the top level elements for a Class MyType when i do not have the MyTypeDocument instance?  And when i need to do this in a generic fashion where i will not know the exact type all the time.

for example, i want this:

<mytype>
  <name>Tom</name>
  <telephone>333-333-3333</telephone>
</mytype>

but i am getting:

<name>Tom</name>
<telephone>333-333-3333</telephone>

Reply via email to