Read xml-structure from a xml-document stored in a xmltype-column?

Hello,
I have several xml-documents stored in a table with a xmltype-column.
Is it possible to read the structure of one xml-document? I need to know what data are exists in the xml-documents.
I had read some hours here, but I dont find a suitable solution for that.
To make a example, what I need:
I have stored the following xml-document in the table:
<?xml version = '1.0'?>
<ROWSET>
<ROW num="6">
<EMPLOYEE_ID>105</EMPLOYEE_ID>
<FIRST_NAME>David</FIRST_NAME>
<LAST_NAME>Austin</LAST_NAME>
<EMAIL>DAUSTIN</EMAIL>
<PHONE_NUMBER>590.423.4569</PHONE_NUMBER>
<HIRE_DATE>6/25/1997 0:0:0</HIRE_DATE>
<JOB_ID>IT_PROG</JOB_ID>
<SALARY>4800</SALARY>
<MANAGER_ID>103</MANAGER_ID>
<DEPARTMENT_ID>60</DEPARTMENT_ID>
</ROW>
</ROWSET>
I need to return the following:
ROWSET
...ROW
......EMPLOYEE NUMBER
......FIRST_NAME VARCHAR2
......DEPARTMENT_ID NUMBER
Regards,
Mark

Hi,
I was on a wrong way. The datatype is not stored in xml, this was a mistake from me.
I needed something to printout some values from a xml-file. This xml-file was generated bei MS Excel. The data are in /Workbook/Worksheet/Table/Cell and I didnt know how to access it.
I write for that the following:
DECLARE
v_xml XMLType;
v_doc dbms_xmldom.DOMDocument;
v_node dbms_xmldom.DOMNode;
type t_values is table of varchar2(2000) index by binary_integer;
v_values t_values;
type t_table is table of t_values index by binary_integer;
v_table t_table;
procedure node_output (v_node in out dbms_xmldom.DOMNode)
is
v_nodelist1 DBMS_XMLDOM.DOMNodeList;
v_nodelist2 DBMS_XMLDOM.DOMNodeList;
v_anzahlnodes number;
v_anzahlrows number;
v_node_c dbms_xmldom.DOMNode;
v_xmlmitarbeiterid number;
begin
v_nodelist1 := dbms_xmldom.GETCHILDNODES(v_node);
v_anzahlrows := DBMS_XMLDOM.GETLENGTH(v_nodelist1);
if v_anzahlrows = 0 or DBMS_XMLDOM.GETNODENAME(v_node) = 'Table'
then
if v_anzahlrows > 0
then
for i1 in 0..v_anzahlrows - 1
loop
v_node := dbms_xmldom.Item(v_nodelist1,i1);
v_nodelist2 := dbms_xmldom.GETCHILDNODES(v_node);
v_anzahlnodes := DBMS_XMLDOM.GETLENGTH(v_nodelist2);
for i2 in 0..v_anzahlnodes - 1
loop
v_node := dbms_xmldom.Item(v_nodelist2,i2);
v_node_c := dbms_xmldom.GETFIRSTCHILD(v_node);
v_node_c := dbms_xmldom.GETFIRSTCHILD(v_node_c);
v_values(i2) := DBMS_XMLDOM.GETNODEVALUE(v_node_c);
end loop;
v_table(i1) := v_values;
end loop;
for i1 in 1..v_anzahlrows - 1
loop
select SEQ_XMLMITARBEITER.nextval into v_xmlmitarbeiterid from dual;
for i2 in 1..v_table(i1).count - 1
loop
dbms_output.put_line(v_table(i1)(i2));
end loop;
end loop;
end if;
else
v_node := dbms_xmldom.GETFIRSTCHILD(v_node);
for i in 0..v_anzahlrows - 1
loop
v_node := dbms_xmldom.Item(v_nodelist1,i);
node_output(v_node);
end loop;
end if;
end;
BEGIN
select inhalt into v_xml FROM xmlimport WHERE name = 'F23973/mitarbeiter.xml';
v_doc := dbms_xmldom.newDOMDocument(v_xml);
v_node:= dbms_xmldom.makeNode(dbms_xmldom.getDocumentElement(v_doc));
node_output(v_node);
END;
This gives me all data from a xml-Excel-file. Is there a better way to do that? I have Oracle 10.2.
Regards,
Mark

Similar Messages

  • How can I get the XML structure from a flat structure?

    Hi all,
    in my XI SP 12 I use a JMS adapter to read information using the WebSphereMQ transport protocol.
    The structure that I receive have this format:
    <Name_A.KeyFieldValue><Name_A.fieldName_A1_Value>...<Name_A.fieldName_AN_Value>
    <NumberRecordType_B><NumberRecordType_c>
    <Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value>
    <Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value>
    <Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>
    <Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>
    the problem is that in this structure each line is not separated by a carriage return or a comma, I have all the information in a single line:
    <Name_A.KeyFieldValue><Name_A.fieldName_A1_Value>...<Name_A.fieldName_AN_Value><NumberRecordType_B><NumberRecordType_c><Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value>...<Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value><Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>...<Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>
    and the customer don't want to insert a line separator.
    Then, the question is:
    How can I get the XML structure from this structure?
    If possible, I don't want to develop new Module and add it in the JMS Module Sequence.
    PS I have already read the article "How to Use the Content Conversion Module with the XI 3 J2EE JMS Adapter.pdf" and it doesn't seem to help me.
    Best Regards,
    Paolo

    To get context parameters from your web.xml file you can simply get the ActionServlet object from an implementing action object class. In the perform (or execute) method make the following call.
    ServletContext context = getServlet().getServletContext();
    String tempContextVar =
    context.getInitParameter("<your context param >");

  • The size of a XML document stored in a XMLType table

    Is there a way to find out (via SQL) the size of a XML document stored in a XMLType table or XMLType column (storage OR based)?
    For instance in the way you could it retrieve if the XML document was stored in an XMLType column (CLOB based)
    SQL> r
    1 select dbms_lob.getlength(t.gegevens.getclobval()) "SIZE"
    2 from hgo.hgo010_detam t
    3* where rownum < 2
    SIZE
    2750

    Is there a way to find out (via SQL) the size of a XML document stored in a XMLType table or XMLType column (storage OR based)?
    For instance in the way you could it retrieve if the XML document was stored in an XMLType column (CLOB based)
    SQL> r
    1 select dbms_lob.getlength(t.gegevens.getclobval()) "SIZE"
    2 from hgo.hgo010_detam t
    3* where rownum < 2
    SIZE
    2750

  • How to change  XML  Structure from one form to another form using OO ABAP.

    Hi Experts,
    In my Scenario, i need to do ABAP Mapping in order to change Incoming structure from one form to another.
    My Input to ABAP Mapping (OO ABAP Program)would be :
         <A>..........</A>
         <B>..........</B>
         <C> .........</C>
         <D>..........</D>
         <E>..........</E>
         <F>..........</F>
    OO ABAP Program need to read this input and change the XML Structure into below form:
         <A>..........</A>
         <B>..........</B>
         <C> .........</C>
          <X>
                <D>..........</D>
                <E>..........</E>
          <F>...............<F>
    Please provide inputs (sample Code) to solve this issue.
    Thanks,
    Kish.
    Edited by: Kishore Reddy Thamma on Jan 22, 2008 2:51 PM
    Edited by: Kishore Reddy Thamma on Jan 22, 2008 2:52 PM

    Hi,
    Please provide sample code or Material for converting XML Structure from one form to another using OO ABAP and
    Steps for ABAP MAPPING.
    Thanks,
    Kish.

  • How to read configuration data from an xml file (not web.xml)?

    Hi,
    I want to separate the application specific configuration parameters in a separate xml file and read them as and when they are needed? I know that I can use the wb.xml but I want to separate them in a different xml file because I don't want the web.xml file to be played around later after deployment. If any change is needed then it should be done in the application-config.xml.
    How can I read the parameters from this xml file in my jsp code and also what should be the location of this file if I have
    ../webapps/Root/application
    directoty structure ?
    Any help is greatly appreciated.

    can you give an example of a property file and also
    it is loaded in the jsp ?Hmm... loading properties in a JSP is not a very good idea. You should do it in a separate class, rather than mixing the logic with the display logic.
    Properties properties = new Properties();
    properties.load(UtilClass.class.getResourceAsStream("config.properties"));
    // Add a try - catch block around the load
    // for IOException...

  • Difference in XML structure from design time to run time

    Hi,
    My source message type that i have constructed has the following XML structure
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
       <ns0:Message1>
          <ns1:Employee_MT xmlns:ns1="http://accenture.com/RoutingBasedOnContextobjects">
             <Record>
                <Emp_Header>
                   <Key/>
                   <Emp_ID/>
                   <Emp_Name/>
                   <Emp_Location/>
                </Emp_Header>
                <Emp_Weekly_Details>
                   <Key/>
                   <Week_No/>
                   <Week_Hours/>
                   <Week_Wages/>
                </Emp_Weekly_Details>
                <Emp_Summary>
                   <Key/>
                   <Total_Hours/>
                   <Total_Wages/>
                </Emp_Summary>
             </Record>
          </ns1:Employee_MT>
       </ns0:Message1>
    </ns0:Messages>
    Whereas when I test the scenario using a test file based on my file content conversion that I have configured in the sender file adapter the XML for the sender message type that is constructed is as follows
    <?xml version="1.0" encoding="utf-8"?>
    <ns:Employee_MT xmlns:ns="http://accenture.com/RoutingBasedOnContextobjects">
    <Record>
         <Emp_Header>
              <Emp_ID>1000888</Emp_ID>
              <Emp_Name>Alex</Emp_Name>
              <Emp_Location>PDC</Emp_Location>
         </Emp_Header>
         <Emp_Weekly_Details>
              <Week_No>1</Week_No>
              <Week_Hours>45</Week_Hours>
              <Week_Wages>900</Week_Wages>
         </Emp_Weekly_Details>
         <Emp_Weekly_Details>
              <Week_No>3</Week_No>
              <Week_Hours>45</Week_Hours>
              <Week_Wages>900</Week_Wages>
         </Emp_Weekly_Details>
         <Emp_Summary>
              <Total_Hours>90</Total_Hours>
              <Total_Wages>1800</Total_Wages>
         </Emp_Summary>
    </Record>
    <Record>
         <Emp_Header>
              <Emp_ID>1000880</Emp_ID>
              <Emp_Name>Sam</Emp_Name>
              <Emp_Location>PDC</Emp_Location>
         </Emp_Header>
         <Emp_Weekly_Details>
              <Week_No>1</Week_No>
              <Week_Hours>45</Week_Hours>
              <Week_Wages>900</Week_Wages>
         </Emp_Weekly_Details>
         <Emp_Weekly_Details>
              <Week_No>3</Week_No>
              <Week_Hours>45</Week_Hours>
              <Week_Wages>900</Week_Wages>
         </Emp_Weekly_Details>
         <Emp_Summary>
              <Total_Hours>90</Total_Hours>
              <Total_Wages>1800</Total_Wages>
         </Emp_Summary>
    </Record>
    </ns:Employee_MT>
    The actual message mapping has the XML structure as
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
       <ns0:Message1>
          <ns1:Employee_MT xmlns:ns1="http://accenture.com/RoutingBasedOnContextobjects">
             <Record>
            </Record>
          </ns1:Employee_MT>
       </ns0:Message1>
    </ns0:Messages>
    whereas the XML structure that is being constructed by my sender file adapter is
    <?xml version="1.0" encoding="utf-8"?>
    <ns:Employee_MT xmlns:ns="http://accenture.com/RoutingBasedOnContextobjects">
    <Record>
    </Record>
    <Record>
    </Record>
    </ns:Employee_MT>
    Could someone tell me why there is difference in the XML structure that is being generated by my file sender adapter and how can I fix this problem.
    As a result of this when i copy the source payload from SXMB_MONI and put it in the test tab of message mapping the XML is not being well formed.
    Cheers,
    S

    these tag gets added automatically when u use multimapping concepts(by changing the messge type occ)
    copy ur entire source xml (from sxmb_moni) and paste it under the Messages and Message1 tags to test under ESR (test tab):
    something like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    <ns0:Message1>
    <ns:Employee_MT xmlns:ns="http://accenture.com/RoutingBasedOnContextobjects">
    <Record>
    <Emp_Header>
    <Emp_ID>1000888</Emp_ID>
    <Emp_Name>Alex</Emp_Name>
    </Record>
    <Record>
    </Record>
    </ns:Employee_MT>
    </ns0:Message1>
    </ns0:Messages>

  • Reading rule sets from an XML file

    Hi all,
    How can I read rule sets from an XML file? I have been given some rules in XML
    format and using those I have to query some content. I am using WLP4.0
    Also how can I code rules in java?
    Thanks in advance.

    You can have the following classes:
    Players class deriving from Vector (or containing a vector), and then
    Player class with attribute 'name'.
    class Players
               Vector myVector = new Vector();
                void addPlayer(Player p)
                      myVector.add(p);
                Player getPlayer(int index)
                      myVector.get(index);
    class Player
             private String myName = null;
             Player(String name)
                    this.myName = name;
             String getName()
                    return myName;
    }Then while handling the SAX events you can do the following:
    class MySAXHandler implements ContentHandler (or whatever the itnerface is)
                 public void startElement(String name,....)
                          Players p = null;
                          if(name.equals("Players"))
                                 p = new Players();
                         else if (name.equals("Name"))
                                p.add(new Player(value));
    }HTH,
    Kalyan.

  • Loading an xml file from an xml file

    I'm trying to load an xml file from an xml file, but I'm
    having problems. My first xml file is really simple - it only
    contains one attribute with the name of another xml file in it
    (eventually I will have multiple xml files in here and run a loop
    on them...this is why I want to load an xml file from an xml file).
    Currently, with the code below, I can get the main xml file
    to load ("main.xml"), but I cannot get the secondary xml files to
    load FROM the main.xml.
    I want to then take childNode values from the secondary xml
    file and use them within my .swf in text boxes and whatnot.
    Any guidance? I think I'm going wrong on the line where I'm
    saying "i.newxml.load(i.attributes.location);"
    - How can I get this to work?

    johnypeter:
    I tried changing the code inside the loop to use just
    "newxml" instead of "i.newxml", and I declared with "var newxml =
    new XML();" - was this what you were thinking?
    kglad:
    The reason I tried to use the loadXML() function in the loop
    was so that for each node in my "main.xml" it would load the new
    xml file listed - this is a no-no? Do you have any ideas as to what
    I could do?
    For the for-loop, what should I change in it? I'm not great
    with loops so I tried to modify some code from another loop I found
    in another forum thread - not the right way to do it here?
    Also, what should I trace? The value of the _root.address, or
    i.attributes.location? I have created dynamic text boxes on my
    stage to see if the correct value from the xml file loads (ie. the
    name of the xml file within the xml file) and it does, but now I
    don't know how to put that information into ANOTHER loadXML()
    function and get the node information from it - does that make
    sense???
    Below are the examples of the xml files I am using. In the
    first one, main.xml, I will have a list of multiple xml files, each
    with the same nodes and elements as in the details.xml file
    (different values, of course).
    This is just to give you an example of what I'm trying to
    accomplish - pulling ALL the addresses and phone numbers from
    multiple xml files. I cannot manually collect this information, as
    it is dynamic, and will be updated in each individual details.xml.
    I was hoping to collect the information by simply adding to and
    updating ONE xml file - main.xml.
    Do you think this can be done? Am I going about it the wrong
    way? I'm quite limited in AS knowledge, which is why I'm piecing
    together code from other posts!

  • Nested XML structure from Oracle

    Using the SQL Adapter i BizTalk, calling a SQL Stored procedure on a MS SQL DB, I can get a nice nested XML structure using p JOIN ii and FOR XML AUTO, like this
    <p code="DK003">
    <ii stamp="2013-01-14T10:27:38.790"value="180.702052"price="184.000000">
    <d Dividend="2.50"DividendDate="2012-03-29T00:00:00" />
    </ii>
    <ii stamp="2013-01-14T10:27:38.790"value="181.702052"price="14.000000">
    <d Dividend="2.50"DividendDate="2012-03-29T00:00:00" />
    </ii>
    </p>
    How can I get the same on Oracle ??

    Hi E.,
    I guess this an XML namespace issue. I'm creating XmlForms-style documents and had to add an XML namespace to my root element to make them visible as such:
    Namespace xf = Namespace.getNamespace("xf", "http://www.sapportals.com/wcm/app/xmlforms");
    root.addNamespaceDeclaration(xf);
    So what I'd suggest to you is reading out the IResource and treating the content as XML:
    Document document = new  SAXBuilder().build(content.getInputStream());
    Element root = document.getRootElement();
    Namespace xf = Namespace.getNamespace("xf", "http://www.sapportals.com/wcm/app/xmlforms");
    root.removeNamespaceDeclaration(xf);
    Hope this helps!
    regards,
    Christian

  • XSL-FO unable to read special characters from the XML file

    Team,
    please help on issue, when trying to read the text from XML file (Special characters like bullet). It is displaying as Question mark(?) in output in place of bullet..please proved any soultion.

    The "?" signals a character set mismatch issue - http://www.oracle.com/technetwork/database/globalization/nls-lang-099431.html - between client and database software

  • How to extract a set of XML elements from an XML element

    My XML, stored in a variable called v_XML_input, is as follows:
    <Root>
      <PackageName>MY_PKG</PackageName>
      <ProcedureName>SAVE_ADJ_VALUES</ProcedureName>
        <Parameters> 
          <Parameter>
              <Name>p_xml_string</Name>
              <Value><DocumentElement>
                       <tblAdjustments>
                         <EmpID>41439</EmpID>
                         <UserNTID>APPUSER</UserNTID>
                         <Comment>TEST RECORD</Comment>
                         <Amount>2000</Amount>
                         <RecordType>R</RecordType> 
                       </tblAdjustments>
                      </DocumentElement>
              </Value>
          </Parameter>
        </Parameters>
    </Root>I want to extract only whatever is between <Value> and </Value>. In this case just this:
                    <DocumentElement>
                       <tblAdjustments>
                         <EmpID>41439</EmpID>
                         <UserNTID>APPUSER</UserNTID>
                         <Comment>TEST RECORD</Comment>
                         <Amount>2000</Amount>
                         <RecordType>R</RecordType> 
                       </tblAdjustments>
                      </DocumentElement>The actual values between the <Value> and </Value> may not always be these same elements; they may be strings, numerical values, or other XML values.
    I've tried the following in a LOOP, and it works for other strings and numerical values, but I get a ORA-30625: method dispatch on NULL SELF argument is disallowed when trying to extract an XML value as a string.
    v_sql_str := v_XML_input .extract('//Parameters/Parameter[position() = '||i||']/Value/text()') .getstringVal()||'''';Any help is appreciated...TIA!

    Not sure what you are actually trying to accomplish.
    What's wrong with
    SQL> SELECT xmlserialize(content XMLTYPE
              ('<Root>
      <PackageName>MY_PKG</PackageName>
      <ProcedureName>SAVE_ADJ_VALUES</ProcedureName>
        <Parameters> 
          <Parameter>
              <Name>p_xml_string</Name>
              <Value><DocumentElement>
                       <tblAdjustments>
                         <EmpID>41439</EmpID>
                         <UserNTID>APPUSER</UserNTID>
                         <Comment>TEST RECORD</Comment>
                         <Amount>2000</Amount>
                         <RecordType>R</RecordType> 
                       </tblAdjustments>
                      </DocumentElement>
              </Value>
          </Parameter>
        </Parameters>
    </Root>'
              ).extract('//Value/*') indent)xml
      FROM DUAL
    XML                                                                                                                                                                                                                                                                                                        
    <DocumentElement>                                                                                                                                                                                                                                                                                          
      <tblAdjustments>                                                                                                                                                                                                                                                                                         
        <EmpID>41439</EmpID>                                                                                                                                                                                                                                                                                   
        <UserNTID>APPUSER</UserNTID>                                                                                                                                                                                                                                                                           
        <Comment>TEST RECORD</Comment>                                                                                                                                                                                                                                                                         
        <Amount>2000</Amount>                                                                                                                                                                                                                                                                                  
        <RecordType>R</RecordType>                                                                                                                                                                                                                                                                             
      </tblAdjustments>                                                                                                                                                                                                                                                                                        
    </DocumentElement> ?
    Note: xmlserialize is not necessary and is there just for pretty printing the result.

  • Xml import from mutlitple xml files

    Is it possible to import different xml files for different locations within the same InDesign document?
    For example a single page has two text boxes. Text Box 1 needs to import data from File1.xml, Text Box 2 needs to import data from File2.xml, etc. Is this possible or will File1.xml and File2.xml need to be merged into one xml file?

    TurtleCruiser,
    One of the problems I have had is that I want the data to update through linking, but I've only managed to get one text box to update while the data in the other box disappeared. Since posting I have managed to achieve the desired result using InDesign Tagged Text. Ideally, I would like to use xml so I will see if I can achieve the same result with your method.
    Many thanks for your reply.

  • Creating an XML instance from an XML Schema

    Hello,
    Does anyone know how to create a skeleton XML instance from the mandatory fields taken from an XML Schema?
    There might be a way with XSLT, however I cannot find the relevant tutorials for this issue.
    Can you please help me out?
    Thanks.

    Of course I meant how to achieve this "on the fly" using XSLT and Java.

  • Using REGEXP_REPLACE to remove XML data from between XML tags

    Hello there,
    I am trying to use the REGEXP_REPLACE SQL function on a piece of XML, to remove the actual XML data from the elements. My end goal is to end up with a comma-delimited list of XML element names. As part of the first step, I just want to rip out all the actual data.
    I tested the following query, and it initially appeared to work:
    SELECT REGEXP_REPLACE('&gt;THIS IS A TEST&lt;',
                          '&gt;([[:alnum:]]\s|\S)*&lt;',
                          '&gt;&lt;' ) AS test_result
      FROM dual;Unfortunately, when I applied this to a full XML string, it didn't work. Here is the test query I used:
    SELECT REGEXP_REPLACE('&lt;ROW&gt;&lt;TEST_ELEMENT1&gt;123&lt;/TEST_ELEMENT1&gt;&lt;TEST_ELEMENT2&gt;THIS IS A TEST!&lt;/TEST_ELEMENT2&gt;&lt;/ROW&gt;',
                          '&gt;([[:alnum:]]\s|\S)*&lt;',
                          '&gt;&lt;') AS test_result
      FROM dual;I ended up with the following output:
    *&lt;ROW&gt;&lt;/ROW&gt;*
    What I was trying for was:
    *&lt;ROW&gt;&lt;TEST_ELEMENT1&gt;&lt;/TEST_ELEMENT1&gt;&lt;TEST_ELEMENT2&gt;&lt;/TEST_ELEMENT2&gt;&lt;/ROW&gt;*
    If you're reading this and you're a Posix RegExp Guru, please could you let me know exactly where I'm going wrong? RegExps are not my strong point, but I'd like to get better at them.

    jmcnaug2 wrote:
    Just out of interest, how would you go about writing the XQuery function so that it returns the actual XML Element values in comma-delimited form (This is Oracle Canonical XML, so has a very basic layout)? ;)Do you mean like this ?
    SQL> SELECT xmlquery(
      2    'for $i in $d/ROWSET/ROW
      3     return string-join($i/*, ",")'
      4    passing dbms_xmlgen.getXMLType('SELECT employee_id, last_name, first_name FROM employees WHERE rownum < 10') as "d"
      5    returning content
      6  ).getClobVal() as csv
      7  FROM dual;
    CSV
    100,King,Steven
    101,Kochhar,Neena
    102,De Haan,Lex
    103,Hunold,Alexander
    104,Ernst,Bruce
    105,Austin,David
    106,Pataballa,Valli
    107,Lorentz,Diana
    108,Greenberg,Nancy
    SQL>

  • How to create an XML fril from an XML instance

    i have already created an instance of the xml using the classes generated from
    the SCHEMA, how will i generate an xml file from the instance i have? is it the
    same like the marshalling/unmarshalling Castor is doing? help please!!!

    It worked, Thanks so much!
    "Steve Traut" <[email protected]> wrote:
    Manuel -- If you simply want to write out the XML you've created, you
    can
    use one of the save methods exposed by your generated XMLBeans types.
    For
    example, to write the XML out to a file, you might do this:
    File myFile = new File("c:/myXml.xml");
    try
    myNewXmlDoc.save(myFile);
    catch (java.io.IOException ioe)
    System.out.println("Error while writing my XML file");
    Note that other save methods are available to write to other formats.
    Steve
    "Manuel Pantaleon" <[email protected]> wrote in message
    news:3f9f9312$[email protected]..
    i have already created an instance of the xml using the classes generatedfrom
    the SCHEMA, how will i generate an xml file from the instance i have?is
    it the
    same like the marshalling/unmarshalling Castor is doing? help please!!!

Maybe you are looking for