2 Replies Latest reply: Jun 7, 2007 1:05 PM by 807606 RSS

    XMLBeans

    807606
      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?
        • 1. Re: XMLBeans
          807606
          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());
          • 2. Re: XMLBeans
            807606
            Doesn't the factory have output methods?