XMLBeans

I am trying to generate an xml file from an xsd schema using XMLBeans. Here is the code I am using:-

TestXmlBeans tm =new TestXmlBeans();

tm.mydoc = ROWSETDocument.Factory.newInstance();

ROWSET rowSet = tm.mydoc.addNewROWSET();

ROWSETDocument.ROWSET.ROW row = rowSet.addNewROW();

row.setPORTFOLIOID("123");

row.setCOUNT("khuytfdfd");

So I have populated the pojos generated by scomp command. The question now is how to generate the xml file itself? Any advice?

[593 byte] By [LisaMa] at [2007-11-27 6:45:03]
# 1

> I am trying to generate an xml file from an xsd

> schema using XMLBeans. Here is the code I am

> using:-

>

> > TestXmlBeans tm = new TestXmlBeans();

> tm.mydoc = ROWSETDocument.Factory.newInstance();

> ROWSET rowSet = tm.mydoc.addNewROWSET();

> ROWSETDocument.ROWSET.ROW row =

> = rowSet.addNewROW();

> row.setPORTFOLIOID("123");

> row.setCOUNT("khuytfdfd");

>

>

>

> So I have populated the pojos generated by scomp

> command. The question now is how to generate the xml

> file itself? Any advice?

System.out.println(tm.mydoc.xmlText());

kilyasa at 2007-7-12 18:16:41 > top of Java-index,Java Essentials,Java Programming...
# 2
Doesn't the factory have output methods?
Hippolytea at 2007-7-12 18:16:41 > top of Java-index,Java Essentials,Java Programming...