Java Mailing List Archive

http://www.gg3721.com/

Home » user.groovy »

[groovy-user] generate XML

wazz

2008-08-14

Replies: Find Java Web Hosting

Author LoginPost Reply

I am trying to generate a new xml file with some nodes extracted from a BLOB
XML.

everything loads fine and the parsing is ok :
def records = new XmlParser().parseText(i.XML);
SQLData sd = new SQLData();
sd.setXML(records.QuestionList);

After that, I am trying to build a new xml file like so :
def fw = new FileWriter("XML/file.xml" );
def xml = new MarkupBuilder(fw);

for(i in data)
{
  xml.record(i.getXML());
}

I can print i.getXML, but it doesn't insert properly. What I have this
:[QuestionList[attributes={Order=P}; value=[...]]]

How can I insert an extracted node to my new generated xml ?

thank you
--
Sent from the groovy - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


©2008 gg3721.com - Jax Systems, LLC, U.S.A.