Error in xml file validation to its relevant xml schema

Hi All,
I have 3 xml schema files files from which I generated a XML file using PLSQL.I am getting this error when I am trying to validate xml file to the schema:
*'WMWROOT' NOT DECLARED*.Can anyone help me with this,I am including the main schema file and also the XML generated.
XML Schem file:
Itemdownload.xsd:
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="ItemDownload" targetNamespace="http://www.manh.com/ILSNET/Interface" elementFormDefault="qualified"
     xmlns="http://www.manh.com/ILSNET/Interface" xmlns:xs="http://www.w3.org/2001/XMLSchema" version ="2007">
     <xs:include schemaLocation="Item.xsd" />
<xs:element name="WMWROOT" nillable="true" type="WMWROOT" />
<xs:complexType name="WMWROOT">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="WMWDATA" type="WMWDATA" />
</xs:sequence>
</xs:complexType>
<xs:element name="WMWDATA" nillable="true" type="WMWDATA"/>
<xs:complexType name="WMWDATA">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="Items" type="ItemList" />
</xs:sequence>
</xs:complexType>
<xs:element name="Items" nillable="false" type="ItemList" />
<xs:complexType name="ItemList">
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="unbounded" name="Item" nillable="true" type="Item" />
</xs:sequence>
</xs:complexType>
</xs:schema>
The generated xml file is:
<?xml version="1.0" ?>
<WMWROOT>
<WMWDATA>
<Items>
<Item><Action>Save</Action><UserDef8>10074</UserDef8><Active>Y</Active><AvailableOnWeb>N</AvailableOnWeb><Company>OU: ResMed Corp</Company><Cost>285.93</Cost><Desc>HP DESKJET PRINTER (EMBLA)</Desc><HarmCode><UserDef8>10074</UserDef8></HarmCode><Item>R145-794</Item><InventoryTracking>Y</InventoryTracking><LongDesc>HP DESKJET PRINTER (EMBLA)</LongDesc><LotControlled>Y</LotControlled><SerialNumTrackOutbound>7</SerialNumTrackOutbound><StorageTemplate><Template>Each</Template></StorageTemplate><XRefs><XRef><XRefItem></XRefItem></XRef></XRefs></Item>
<Item><Action>Save</Action><UserDef8>80862</UserDef8><Active>Y</Active><AvailableOnWeb>N</AvailableOnWeb><Company>OU: ResMed Corp</Company><Cost>54.27</Cost><Desc>Mirage Micro Mask MED&amp;LG-Internet Pkg</Desc><HarmCode><UserDef8>80862</UserDef8></HarmCode><Item>16359</Item><InventoryTracking>Y</InventoryTracking><LongDesc>Mirage Micro Mask MED&amp;LG-Internet Pkg</LongDesc><LotControlled>Y</LotControlled><SerialNumTrackOutbound>N</SerialNumTrackOutbound><StorageTemplate><Template>Each</Template></StorageTemplate><XRefs><XRef><XRefItem>619498163597</XRefItem></XRef></XRefs></Item>
</Items>
</WMWDATA>
</WMWROOT>
I can provide you with the other 2 dependent schemas if needed.Please reply me!!

Hey,
As you said I tried keeping the namespace in xml file and it worked for a strange reason I am getting the same error again,I am not able to figure it why!!
The error is:
SAMPLEITEMDLFILE.xml:2,139: no declaration found for element 'WMWROOT'
The XML document SAMPLEITEMDLFILE.xml is NOT valid (1 errors)
This is the part of PL/SQL code thru which I am generating the xml:
UTL_FILE.put_line (l_out_file, '<?xml version="1.0" ?>');
UTL_FILE.put_line (l_out_file, '<WMWROOT');
UTL_FILE.put_line (l_out_file, 'xmlns="http://www.manh.com/ILSNET/Interface"> ');
UTL_FILE.put_line (l_out_file, '<WMWDATA>');
UTL_FILE.put_line (l_out_file, '<Items>');
I am validating it in stylus studio tool.
Can you please help me thru this?

Similar Messages

  • XML Fetch Error. The XML file assigned in the configuration.xml is either wrong or corrupted.

    1.Some web pages give "XML Fetch Error. The XML file assigned in the configuration.xml is either wrong or corrupted".
    2.Youtube gives, after pressing start button, message"An error occurred. Please try again later.
    Opening same youtube page with IE, there is no problems.
    3.Scrolling on Mozilla firefox pages works only with sidebar not with mouse wheel.
    Other user accounts on this computer doesn't have these problems.
    BR, Juha

    This can be caused by a recent Flash 11.3 update.
    See:
    *https://support.mozilla.org/kb/flash-113-doesnt-load-video-firefox

  • Pages file is missing its index.xml file?

    all the "pages" files which i have created on my computer recently are saying that they have the file is missing its "index.xml"
    im freaking out because i have two uni assignemnts due and both files aren't opeing!
    help!
    i have opened the content of the file.. and all other places are telling me there should be a file called index.zip, in there and to rename it as .pages or to copy off and re open it, or to rename it as zip.xml and try again...
    nothing is working

    You have 2 versions of Pages on your Mac.
    Pages 5 is in your Applications folder.
    Pages '09/'08 is in your Applications/iWork folder.
    You are alternately opening the wrong versions.
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Pages 5/5.01 can not open Pages 5.1 files and you will get the warning that you need a newer version.
    Pages 5.1 sometimes can not open its own files and you will get the warning that you need a newer version.
    Pages 5 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Anything that is saved to iCloud is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Apple has not only managed to confuse all its users, but also itself.
    Note: Apple has removed over 100 features from Pages 5 and added many bugs:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Archive/trash Pages 5, after exporting all Pages 5 files to Pages '09 or Word .docx, and rate/review it in the App Store, then get back to work.
    Peter

  • Error in xml file validating to xml schema

    Hey,
    I am getting the following error while validating xml file to its schema:
    The error is:
    SAMPLEITEMDLFILE.xml:2,139: no declaration found for element 'WMWROOT'
    The XML document SAMPLEITEMDLFILE.xml is NOT valid (1 errors)
    schema file:
    <?xml version="1.0" encoding="utf-8" ?>
    <xs:schema id="ItemDownload" targetNamespace="http://www.manh.com/ILSNET/Interface" elementFormDefault="qualified"
         xmlns="http://www.manh.com/ILSNET/Interface" xmlns:xs="http://www.w3.org/2001/XMLSchema" version ="2007">
         <xs:include schemaLocation="Item.xsd" />
    <xs:element name="WMWROOT" nillable="true" type="WMWROOT" />
    <xs:complexType name="WMWROOT">
    <xs:sequence>
    <xs:element minOccurs="0" maxOccurs="1" name="WMWDATA" type="WMWDATA" />
    </xs:sequence>
    </xs:complexType>
    <xs:element name="WMWDATA" nillable="true" type="WMWDATA"/>
    <xs:complexType name="WMWDATA">
    <xs:sequence>
    <xs:element minOccurs="0" maxOccurs="1" name="Items" type="ItemList" />
    </xs:sequence>
    </xs:complexType>
    <xs:element name="Items" nillable="false" type="ItemList" />
    <xs:complexType name="ItemList">
    <xs:sequence>
    <xs:element minOccurs="1" maxOccurs="unbounded" name="Item" nillable="true" type="Item" />
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    This is the part of PL/SQL code thru which I am generating the xml:
    UTL_FILE.put_line (l_out_file, '<?xml version="1.0" ?>');
    UTL_FILE.put_line (l_out_file, '<WMWROOT');
    UTL_FILE.put_line (l_out_file, 'xmlns="http://www.manh.com/ILSNET/Interface"> ');
    UTL_FILE.put_line (l_out_file, '<WMWDATA>');
    UTL_FILE.put_line (l_out_file, '<Items>');
    I am validating it in stylus studio tool.
    Can any1 tell me where I am goin wrong?

    Hi,
    I am using databse version 10.2.0.03. I am getting the output of xml file like tis:
    <?xml version="1.0" ?>
    <WMWROOT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.manh.com/ILSNET/Interface ItemDownload.xsd">
    WMWDATA>
    <Items>
    <Item>
    <action>Save</action><UserDef8>10074</UserDef8><active>Y</active><availableonweb>N</availableonweb><cost>285.93</cost><desc>HP DESKJET PRINTER (EMBLA)</desc><HarmCode><Identifier>9019.20.0000</Identifier></HarmCode><Item>R145-794</Item><InventoryTracking>Y</InventoryTracking><LongDesc>HP DESKJET PRINTER (EMBLA)</LongDesc><LotControlled>Y</LotControlled><SerialNumTrackInbound>Y</SerialNumTrackInbound><SerialNumTrackInventory>Y</SerialNumTrackInventory><SerialNumTrackOutbound>Y</SerialNumTrackOutbound><StorageTemplate><Template>Each</Template></StorageTemplate><XRefs><XRef></XRef></XRefs>
    </Item>
    </Items>
    </WMWDATA>
    </WMWROOT>
    My plsql code is like tis:
    SELECT /*rule*/
    XMLELEMENT (
    "Item",
    XMLFOREST (action AS "action",
    Userdef8 AS "UserDef8",
    active AS "active",
    availableonweb AS "availableonweb",
    cost AS "cost",
    description AS "desc"),
    XMLELEMENT ("HarmCode",
    XMLFOREST (Identifier AS "Identifier")),
    XMLFOREST (
    Item AS "Item",
    inventorytracking AS "InventoryTracking",
    Longdesc AS "LongDesc",
    lotcontrolled AS "LotControlled",
    serialnumtrackinbound AS "SerialNumTrackInbound",
    serialnumtrackinventory AS "SerialNumTrackInventory",
    serialnumtrackoutbound AS "SerialNumTrackOutbound"),
    XMLELEMENT ("StorageTemplate",
    XMLFOREST (Template AS "Template")),
    XMLELEMENT (
    "XRefs",
    XMLELEMENT ("XRef", XMLFOREST (XRefItem AS "XRefitem")))).
    getclobval ()
    ----------------------------------------writing to utl file-------------
    l_out_file :=
    UTL_FILE.fopen (lv_path,
    -- lv_out_file,
    'testingitemsdl.xml',
    'W',
    32767);
    UTL_FILE.put_line (l_out_file, '<?xml version="1.0" ?>');
    UTL_FILE.put_line (l_out_file, '<WMWROOT');
    UTL_FILE.put_line (l_out_file, 'xmlns="http://www.manh.com/ILSNET/Interface"> ');
    UTL_FILE.put_line (l_out_file, '<WMWDATA>');
    UTL_FILE.put_line (l_out_file, '<Items>');
    FOR i IN lc_item_info
    LOOP
    UTL_FILE.put_line (l_out_file, i.item);
    END LOOP;
    UTL_FILE.put_line (l_out_file, '</Items>');
    UTL_FILE.put_line (l_out_file, '</WMWDATA>');
    UTL_FILE.put_line (l_out_file, '</WMWROOT>');
    UTL_FILE.fclose (l_out_file);

  • Reading XML file to use its content

    Hi, I'm trying to read from a XML file that contents the following:
    <conf>
    <address>some address</address>
    <body>some body message</body>
    </conf>
    I'm using the following code to try to read it:
    import java.io.*;
    import javax.xml.parsers.*;
    public class XMLReader {
    public static void main(String[] args) throws Exception {
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    try {
    DocumentBuilder parser = factory.newDocumentBuilder();
    Document documento = parser.parse(new File("C:/salida.xml"));
    Element elemento = documento.getDocumentElement();
    System.out.println(elemento.toString());
    catch (Exception elemento) {
    elemento.printStackTrace();
    I though it was good, but it gives me compilation error, it says it 'cannot resolve symbol' on "DocumentBuilder parser = factory.newDocumentBuilder();", I already added the following libraries: jaxp-api.jar, sax.jar, dom.jar, xalan.jar, xercesImpl.jar, xsltc.jar (all from JAXP API). So, I don't know what else do I need to make it work, what is it?, thanks in advance.

    try this:
    File f = new File("....");
    FileInputString fis = new FileInputStream(f);
    DOMParser parser = new DOMParser();
    InputSource iSource = new InputSource(fis);
    parser.parse(iSource);
    Document doc = parser.getDocument();

  • Input XML file validation based on dtd

    Hi All,
    I get a XML file as input from a customer. It has a reference to a dtd element. So when I try to open the file it looks for the dtd file. Where can I place the dtd file on the application server so that I dont get any error? The XML file has the following header:
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE NAXML-BusDoc SYSTEM "NAXML-BusDoc.dtd">
    <NAXML-BusDoc version="1.0">
    Thanks,
    Geetha

    I get a XML file as input from a customer. It has a reference to a dtd element.
    check out the last reply in this thread (mentions a similar problem of dtd in xml)and check if similar solution can be applicable to you...
    external definition error

  • XML file validation with XSD and loading to database relational table

    Hi all,
    I have some xml files coming to my unix directory. I will be having an XSD for those. My task is to validate those xml against given xsd and load the corresponding data into oracle relational tables with sqlloader only.
    Please help me to accomplish. and let me know the contents of control file ( for SQLLOADER) if i want to load the xml directly to database.
    Unix and/or PLSQL suggestions both are welcome.

    My problem area is loading the XML to Oracle relational tables using sqlloader.
    suppose, the xml is <?xml version="1.0"?>
    <Customers>
    <Customer>
    <CustID>1</CustID>
    <Company>Bell South</Company>
    <City>New York</City>
    </Customer>
    <Customer>
    <CustID>2</CustID>
    <Company>Barnes &amp; Noble</Company>
    <City>New York</City>
    </Customer>
    <Customer>
    <CustID>3</CustID>
    <Company>Comp USA</Company>
    <City>Tampa</City>
    </Customer>
    <Customer>
    <CustID>4</CustID>
    <Company>Borders</Company>
    <City>Charlotte</City>
    </Customer>
    </Customers>
    and I have a relational table
    CREATE TABLE CUSTOMERS
    CUSTID NUMBER,
    COMPANY VARCHAR2(100 BYTE),
    CITY VARCHAR2(100 BYTE)
    how to insert the xml data into the table???
    please help..
    Edited by: nuon on Oct 25, 2010 6:25 AM

  • Re-Using XML file from decode barcode + extract xml process

    I was hoping someone could put me in the right direction here. I am decodeing the information stored in a 2D Bar code and sending this information to an XML file, then I am trying to combine that xml file with a blank PDF template but the process is failing beacuse there are some additional tag fields the XML data from the  Decode->Extract XML process.
    The XML file from the decode process gives the structure below..notice therer some extra tags (lines 2- 4)
    <?xml version="1.0" encoding="UTF-8"?>
    <xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
    <xfa:datasets>
    <xfa:data>
    <form1>
    The XML structure that is expected by the PDF template is as follows
    <?xml version="1.0" encoding="UTF-8"?>
    <form1>
    So the xml output of the Decode barcode + Extract XML process has three extra lines of tag. Is there a way I could use a process within liveCycle to clean out those three lines in real-time before sending the xml to be recombined with the PDF template.
    Thanks

    Hi,
    What you may do is to use the SetValue and its xpath builder functions to "serialize" the xml into string, "substring" to remove the extra tags, and "concat" to add the extra tags and then "deserialize" it again to an xml to be merged with your form.
    Greetings,
    Yasser

  • Import of XML file failed in portal using XML Content and Action

    Hi Friends,
    I am trying to import the simple XML file which is just creating the folder in the PORTAL_CONTENT using XML CONTENT AND ACTIONS  which is one way of creating the portal content. GO TO SYSTEM ADMINISTRATION > TRANSPORT > XML CONTENT AND ACTIONS > IMPORT.
    The reason for using this import tool is to upload the backend Business roles, which is not not working on our corporate portal. To test the import functionality I used the following xml file (I got this XML file by exporting the test folder in the portal using the same tool)
    <GenericCreator author="XML Creator" version="XML Automatic Creation" mode="clean,execute" report.level="success" createMode="1" default.locale="en" ignore="false">
    <Context name="portal_content" objectClass="com.sap.portal.pcd.gl.GlContext"></Context>     <Property name="parent1" value="pcd:portal_content"/>
         <Context name="com.dri.fldr.im" objectClass="com.sap.portal.pcd.gl.GlContext" create_as="0" parent="$">
              <Attributes>
                   <Attribute name="com.sap.portal.pcm.Description" type="text">
                        <AttributeValue value="" locale=""/>
                        <Attribute name="administration" type="string">
                             <AttributeValue value=""/>
                        </Attribute>
                        <Attribute name="Inheritance" type="string">
                             <AttributeValue value="NONFINAL"/>
                        </Attribute>
                   </Attribute>
                   <Attribute name="com.sap.portal.pcm.Title" type="text">
                        <AttributeValue value="test" locale=""/>
                        <AttributeValue value="test" locale="en"/>
                        <Attribute name="administration" type="string">
                             <AttributeValue value=""/>
                        </Attribute>
                        <Attribute name="mandatory" type="string">
                             <AttributeValue value="true"/>
                        </Attribute>
                        <Attribute name="Inheritance" type="string">
                             <AttributeValue value="NONFINAL"/>
                        </Attribute>
                   </Attribute>
              </Attributes>
         </Context>
    </GenericCreator>
    SDN BLOCKED THE XML The above XML file works fine in other portal in the landscape but not in corporate portal ( which is freshly build recently).Following error message is display when i am trying to upload the file
    Status Name Action Type Comment
    General Extracting root node E:\usr\sap\EPD\JC00\j2ee\cluster\server0\%USERPROFILE%\AppData\Local\Temp\tmp_masscontent4135391959047431276.xml Failed to extract root node
    General Extracting root node E:\usr\sap\EPD\JC00\j2ee\cluster\server0\%USERPROFILE%\AppData\Local\Temp\tmp_masscontent4135391959047431276.xml Parsing failed .
    Dont know is there a service/ configurations needs to be done to enable this feature?.
    Thanks
    Edited by: hammad on Sep 4, 2009 5:48 PM
    Edited by: hammad on Sep 4, 2009 5:49 PM

    The problem statement is not very clear.
    Try following this how to guide [https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/207a2141-c870-2910-e080-90c920b24f47&overridelayout=true|How-To]
    Best Regards,
    Prasanna K

  • Reading a xml file and Extract content of xml tags

    Hi,
    I need a InDesign script to Extract content of xml tags by reading a local xml file. And stamping the content of xml on InDesign Text frame.
    My sample xml is as follows .
    <events type="array">
    <event> 
    <aktiv_jn>J</aktiv_jn> 
    <enetpulse_id>1712408</enetpulse_id>
    <event_id>65974</event_id>
    <hjemmehold>AZ Alkmaar</hjemmehold>
    <id>93</id>
    <kickoff>2014-08-17T12:30:00+01:00</kickoff>
    <land_id>140</land_id>
    <land_navn>Holland</land_navn>
    <liga_id>13684</liga_id>
    <liga_navn>Eredivisie</liga_navn>
    <livebetting_jn>J</livebetting_jn>
    <marked_id>2897740</marked_id>
    <marked_nummer>138</marked_nummer>
    <marked_tekst>AZ Alkmaar - Ajax</marked_tekst>
    <moderkamp_jn>J</moderkamp_jn>
    <ob_bet_type>MR</ob_bet_type>
    <odds_1>2.95</odds_1>
    <odds_2>2.25</odds_2>
    <odds_x>3.35</odds_x>
    <program_slut>2014-08-18T23:59:00+01:00</program_slut>
    <program_start>2014-08-15T00:00:00+01:00</program_start>
    <resultat>2</resultat>
    <spilstop_dato_tid>2014-08-17T12:30:00+01:00</spilstop_dato_tid>
    <sport_id>21</sport_id>
    <sport_navn>Fodbold</sport_navn>
    <taerskel nil="true"/>
    <udehold>Ajax</udehold>
    <udfald_1_id>9661951</udfald_1_id>
    <udfald_2_id>9661953</udfald_2_id>
    <udfald_x_id>9661952</udfald_x_id>
    </event>
    </events>
    And on my Indesign Page upon execution of script: I need text like,
    land_navn:     Holland
    odds_1:     2.95
    odds_2:     2.25
    odds_x:     3.35

    Hi,
    Try:

  • Creating xml file and inert tin to xml file in clob column

    i have a table
    CREATE TABLE XMLCLOB of XMLType
    XMLTYPE store AS CLOB;
    now i want to create a xml file by qurying emp table ie select sal,empname from emp.
    the cretaed xml file is saved in the xmlclob table how to do that?

    You will need to use Oracle XML function EXTRACT or EXTRACTVALUE in order to read the data before inserting into Oracle table. These functions need to be used in select statement.
    Syntax:
    EXTRACT(XMLType_Instance>, <XPath_string>, <namespace_string>)
    EXTRACTVALUE(XMLType_Instance>, <XPath_string>, <namespace_string>)

  • Download created XML File in batch mode // Parse XML file into single lines

    Hello!
    I upload a CSV file and based on that CSV file I create an XML "object". First I uploaded and downloaded it via gui frontendclass, but as it has to be run in a batch in the night I need to upload and download the data via OPEN DATASET.
    The import and transformation of the CSV file works fine, also the transfer into an itab with the same structure as a CSV line is ok. I also create the XML file, which could be downloaded easily with gui-download but it is not permittet.
    Import of data: I scan the folder and get the filenames into a itab, I loop over that itab and read the single files like this:
         OPEN DATASET ls_convert_batch FOR INPUT IN TEXT MODE ENCODING DEFAULT.
          CLEAR tab.
          IF sy-subrc = 0.
            DO.
              READ DATASET ls_convert_batch INTO line.
              IF sy-subrc <> 0.
                EXIT.
              ELSE.
                CLEAR tmptab.
                SPLIT line AT ';' INTO  tmptab-product
                                        tmptab-contract
                                        tmptab-extagent.
                APPEND tmptab TO tab.
              ENDIF.
            ENDDO.
          ENDIF.
    The XML file has a strucutre like
    <file>
    - <file formant_no="1.1" format_date="02.10.2003">
      <status>V</status>
      <number>001001025</numbner>
      <name>Schmeisser,Christof</name>
    - <details>
    -    <detail>
             <contract>00000003494</contract>
             <name>Schmeisser, Christof</name>
             <invoice_no>000000003840</invoice_no>
             <due_date>20100601</due_date>
             <amount>140,00</amount>
         </detail>
    -    <detail>
             <contract>00000003495</contract>
             <name>Schmeisser, Christof</name>
             <invoice_no>000000003841</invoice_no>
             <due_date>20100601</due_date>
             <amount>130,00</amount>
         </detail>
    - </details>
    <elements>2</elements>
    <amount_overall>270</amount_overall>
    </file>
    At the moment I download it like this:
    CALL METHOD cl_gui_frontend_services=>gui_download
            EXPORTING
              bin_filesize = l_xml_size
              filename     = filename
              filetype     = 'BIN'
    *        CONFIRM_OVERWRITE = '0'
            CHANGING
              data_tab     = l_xml_table
            EXCEPTIONS
              OTHERS       = 24.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                       WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ELSEIF sy-subrc = 0.
            lv_create_counter = lv_create_counter + 1.
          ENDIF.
    But I need to download it via OPEN TRANSFER CLOSE Dataset as it has to run in batch mode.
    Anyone has an idea? I am really desperate here. One idea would be to parse the single lines into a string and then create the XML file line by line as text and save it with ending XML, should work. But I don't know how!
    Thank you very much in advance,
    kind regards from Tallinn, Estonia,
    Christof!
    Edited by: Christof Schmeisser on Nov 25, 2010 7:51 PM
    I edited the heading, would be too general and missleading!

    Tipos Pools
    TYPE-POOLS: ixml.
    CLASS cl_ixml DEFINITION LOAD.
    TYPES: BEGIN OF xml_node_type,
             node   TYPE char50,
             vlnode TYPE string,
           END OF xml_node_type,
           BEGIN OF xml_line_type,
             data(256) TYPE x,
           END OF xml_line_type.
    Tabelas Internas
    DATA: ti_xml_node        TYPE TABLE OF xml_node_type.
    Variáveis TYPE REF
    *Type REF para utilizar no XML
    DATA: ixml_type             TYPE REF TO if_ixml,
          streamfactory_type    TYPE REF TO if_ixml_stream_factory,
          ostream_type          TYPE REF TO if_ixml_ostream,
          istream_type          TYPE REF TO if_ixml_istream,
          parser_type           TYPE REF TO if_ixml_parser,
          renderer_type         TYPE REF TO if_ixml_renderer,
          document_type         TYPE REF TO if_ixml_document,
          encoding_type         TYPE REF TO if_ixml_encoding,
          node_type             TYPE REF TO if_ixml_node,
          element_dtrans_type   TYPE REF TO if_ixml_element,
          element_xml_in_type   TYPE REF TO if_ixml_element,
          element_roteiros_type TYPE REF TO if_ixml_element,
          element_roteiro_type  TYPE REF TO if_ixml_element,
          element_vias_type     TYPE REF TO if_ixml_element,
          element_via_type      TYPE REF TO if_ixml_element,
          element_dummy_type    TYPE REF TO if_ixml_element,
          gw_xml_node           TYPE TABLE OF xml_node_type,
          gw_xml_node_ret       TYPE TABLE OF xml_node_type,
          gw_xml_node_err       TYPE TABLE OF xml_node_type,
          gw_xml_node_xml       TYPE TABLE OF xml_node_type,
          gw_xml_table          TYPE TABLE OF xml_line_type,
          gw_xml_table2         TYPE TABLE OF xml_line_type,
          gs_xml_node           TYPE xml_node_type,  "WA para leitura do xml
          gs_xml_node_ret       TYPE xml_node_type,  "WA para leitura do xml retorno
          gs_xml_node_err       TYPE xml_node_type,  "WA para leitura do xml erro
          gs_xml_node_xml       TYPE xml_node_type,  "WA para leitura do xml info sucesso
          gs_xml_table2         TYPE xml_line_type.  "WA para importar xml
    Variáveis do Programa
    DATA: l_value              TYPE string,
          l_rc                 TYPE i,
          l_xml_size           TYPE i,
          cod_cartaorepom      TYPE char20 VALUE '123456789',
          v_caminho_exp        TYPE string VALUE 'C:TEMP',
          v_salvaarquivo       TYPE string,
          v_nomearquivo        TYPE string,
          w_nodetext           TYPE string,
          v_roteiros           TYPE string,
          v_roteiro            TYPE string,
          v_roteiro_codigo     TYPE string,
          v_percurso_codigo    TYPE string,
          v_percurso_descricao TYPE string,
          v_cidade_origem      TYPE string,
          v_estado_origem      TYPE string,
          v_cidade_destino     TYPE string,
          v_estado_destino     TYPE string,
          v_transporte_tipo    TYPE string,
          v_cartao_taxa        TYPE string,
          v_cobra_taxa         TYPE string.
    Constants
    CONSTANTS: cc_39         TYPE string VALUE '39', " Numero 39.
               cc_dt_trans   TYPE string VALUE 'data_transfer'," document_type(name)
               cc_metodo_cod TYPE string VALUE 'metodo_codigo'," document_type(name)
               cc_xml_in     TYPE string VALUE 'xml_in'," document_type(name)
               cc_ct_tx_ativ TYPE string VALUE 'cartao_taxa_ativacao'," document_type(name)
               cc_cartao     TYPE string VALUE 'cartao', " Parâmetro Perform.
               cc_xml        TYPE string VALUE '.XML'," extenção
               cc_bin        TYPE char10 VALUE 'BIN'." filetype
    START-OF-SELECTION.
      PERFORM yf_inicia_criacao_xml USING cc_39.
      element_roteiro_type  = document_type->create_simple_element(
                     name   = cc_ct_tx_ativ
                     parent = element_xml_in_type  ).
      PERFORM yf_dummy_roteiro USING cod_cartaorepom cc_cartao.
      PERFORM yf_finaliza_xml.
      PERFORM yf_exporta_xml USING v_caminho_exp.
      PERFORM yf_convert_xml_to_itab TABLES gw_xml_node_ret
                                      USING v_salvaarquivo.
    END-OF-SELECTION.
    *&      Form  yf_inicia_criacao_xml
          text
         -->VALUE(P_0783)  text
    FORM yf_inicia_criacao_xml USING value(p_0783).
      DATA: s_encoding_type TYPE string VALUE 'ISO-8859-1'.
    Cria o ixml factory
      ixml_type = cl_ixml=>create( ).
    *Cria o objeto com modelo
      document_type = ixml_type->create_document( ).
    *Cria o cabeçalho encoding="iso-8859-1"
      encoding_type = ixml_type->create_encoding( byte_order = 0
                        character_set = s_encoding_type ).
    *Cria o root "DATA_TRANSFER"
      element_dtrans_type = document_type->create_simple_element(
                    name  = cc_dt_trans
                  parent  = document_type ).
    *Cria o node "METODO_CODIGO" e preenche com um valor passado no L_VALUE
      l_value = p_0783.
      CONDENSE l_value.
      element_dummy_type = document_type->create_simple_element(
                    name = cc_metodo_cod
                   value = l_value
                  parent = element_dtrans_type ).
    *Cria o node "XML_IN"
      element_xml_in_type   = document_type->create_simple_element(
                  name   = cc_xml_in
                  parent = element_dtrans_type  ).
    ENDFORM.                    " yf_inicia_criacao_xml
    *&      Form  yf_dummy_roteiro
          text
         -->VALUE(P_0996)  text
         -->VALUE(P_0997)  text
    FORM yf_dummy_roteiro USING value(p_0996)
                                value(p_0997).
      l_value  = p_0996.
      CONDENSE l_value.
      element_dummy_type = document_type->create_simple_element(
                    name = p_0997
                   value = l_value
                  parent = element_roteiro_type ).
    ENDFORM.                    " yf_dummy_roteiro
    *&      Form  yf_finaliza_xml
          text
    FORM yf_finaliza_xml.
    *Cria o stream factory
      streamfactory_type = ixml_type->create_stream_factory( ).
    *Conecta a internal table de XML com o stream factory
      ostream_type = streamfactory_type->create_ostream_itable( table = gw_xml_table  ).
      CALL METHOD ostream_type->set_encoding
        EXPORTING
          encoding = encoding_type.
    *Rendering the document
      renderer_type = ixml_type->create_renderer( ostream  = ostream_type
                                            document = document_type ).
      l_rc = renderer_type->render( ).
    *Salva o documento XML
      l_xml_size = ostream_type->get_num_written_raw( ).
    ENDFORM.                    " yf_finaliza_xml
    *&      Form  yf_exporta_xml
          text
         -->VALUE(P_0783)  text
    FORM yf_exporta_xml USING value(p_0783).
      CONCATENATE cod_cartaorepom
                  sy-datum
                  sy-uzeit
                  cc_xml
             INTO v_nomearquivo.
      CONCATENATE p_0783
                  v_nomearquivo
             INTO v_salvaarquivo.
      TRANSLATE v_nomearquivo TO UPPER CASE.
    *Exporta o XML
      CALL METHOD cl_gui_frontend_services=>gui_download
        EXPORTING
          bin_filesize = l_xml_size
          filename     = v_salvaarquivo
          filetype     = cc_bin
        CHANGING
          data_tab     = gw_xml_table
        EXCEPTIONS
          OTHERS       = 24.
      IF sy-subrc = 0.
       PERFORM yf_sapgui_progress_indicator USING cc_msg_xml_ok.
      ELSE.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " yf_exporta_xml
    *&      Form  yf_convert_xml_to_itab
          text
         -->P_GW_XML_NODE_RET  text
         -->P_FILENAME         text
    FORM yf_convert_xml_to_itab  TABLES p_gw_xml_node_ret LIKE gw_xml_node
                                USING  p_filename.
      DATA l_count.
      ixml_type = cl_ixml=>create( ).
    Now Create Stream Factory
      streamfactory_type = ixml_type->create_stream_factory( ).
      CALL METHOD cl_gui_frontend_services=>gui_upload
        EXPORTING
          filename   = p_filename
          filetype   = cc_bin
        IMPORTING
          filelength = l_xml_size
        CHANGING
          data_tab   = gw_xml_table2
        EXCEPTIONS
          OTHERS     = 19.
      IF sy-subrc = 0.
        istream_type = streamfactory_type->create_istream_itable( table = gw_xml_table2
                                                            size  = l_xml_size ).
        document_type = ixml_type->create_document( ).
        parser_type = ixml_type->create_parser( stream_factory = streamfactory_type
                                         istream         = istream_type
                                         document        = document_type ).
        IF parser_type->parse( ) NE 0.
          IF parser_type->num_errors( ) NE 0.
            l_count = parser_type->num_errors( ).
          ENDIF.
        ENDIF.
        CALL METHOD istream_type->close( ).
        CLEAR istream_type.
        node_type = document_type.
        PERFORM yf_get_data USING node_type.
        p_gw_xml_node_ret[] = gw_xml_node[].
        CLEAR gw_xml_node[].
      ENDIF.
    ENDFORM.                    " yf_convert_xml_to_itab
    *&      Form  yf_get_data
          text
         -->VALUE(X_NODE)  text
    FORM yf_get_data    USING value(x_node) TYPE REF TO if_ixml_node.
      DATA: indent      TYPE i.
      DATA: ptext       TYPE REF TO if_ixml_text.
      DATA: string      TYPE string.
      DATA: temp_string(100).
      CASE x_node->get_type( ).
        WHEN if_ixml_node=>co_node_element.
          string = x_node->get_name( ).
          w_nodetext = string.
          CLEAR string.
          string = x_node->get_value( ).
          IF NOT w_nodetext IS INITIAL OR
             NOT string IS INITIAL.
            gs_xml_node-node   = w_nodetext.
            gs_xml_node-vlnode = string.
            IF NOT gs_xml_node-vlnode IS INITIAL.
              APPEND gs_xml_node TO gw_xml_node.
              CLEAR  gs_xml_node.
            ENDIF.
          ENDIF.
      ENDCASE.
    Get the next child
      x_node = x_node->get_first_child( ).
    Recurse
      WHILE NOT x_node IS INITIAL.
        PERFORM yf_get_data USING x_node.
        x_node = x_node->get_next( ).
      ENDWHILE.
    ENDFORM.                    "yf_get_data

  • XI have to break/split XML-File into N times a XML Message

    Hello,
    Can anyone help with this one. I guess this is not an easy exercise but I need to solve it urgently.
    XI gets a XML-file from a system.
    This file has N times a element <XBT>.
    Every time XI gets such a file the number of <XBT> is different.
    XI haves to break this xml into N xml messages according to element ><XBT> in order to send them to Sap sequentially.
    For example the following XML file have to split up into 2 xml files (the elements XBT occurs 2 times)
    How can this be done?
    <mt_BubaBestand>
    <b><XBT></b>
      <Algemeen>
         <Verkooporganisatie>5000</Verkooporganisatie>
         <Distributiekanaal>50</Distributiekanaal>
         <Productgroep>50</Productgroep>
         <Ordernummer>123123</Ordernummer>
         <Verkoopgroep/>
         <Documentdatum>20061207</Documentdatum>
         <Medewerker_nr>e60217</Medewerker_nr>
         <Medewerker_naam>Hermans</Medewerker_naam>
         <CRM_nr/>
         <CIFDedicated/>
         <Klantgroep/>
      </Algemeen>
    <b></XBT></b>
    <b><XBT></b>
      <Algemeen>
         <Verkooporganisatie>5000</Verkooporganisatie>
         <Distributiekanaal>50</Distributiekanaal>
         <Productgroep>50</Productgroep>
         <Ordernummer>123123</Ordernummer>
         <Verkoopgroep/>
         <Documentdatum>20061207</Documentdatum>
         <Medewerker_nr>e60217</Medewerker_nr>
         <Medewerker_naam>Hermans</Medewerker_naam>
         <CRM_nr/>
         <CIFDedicated/>
         <Klantgroep/>
      </Algemeen>
    <b></XBT></b>
    </mt_BubaBestand>

    This is pretty standard procedure if you are posting these messages to R/3.  As was pointed out in the weblogs above, when using IDocs you don't need to do any tricky configuration.  Just make sure that your XML structure is set correctly (ie:  1 to unbounded, etc) to the limits that you want, and XI will automatically loop the mapping process for each instance of the <XBT> item that it detects in the source message.  You mentioned:
    <i>For example the following XML file have to split up into 2 xml files (the elements XBT occurs 2 times)</i>
    Well, you don't actually split it into two XML files per say, XI just processes the source message straight to multiple IDocs using the IDoc adapter.

  • How to read XML file and write into another XML file

    Hi all, I am new to JAVAXML.
    My problem is I have to read one XML file and take some Nodes from that and write these nodes into another XML file...
    I solved, how to read XML file
    But I don't know how to Write nodes into another XML.
    Can anyone help in this???
    Thanks in advance..

    This was answered a bit ago. There was a thread called "XML Mergine" that started on Sept 14th. It has a lot of information about what it takes to copy nodes from one XML Document object into another.
    Dave Patterson

  • Breaking BIG XML files in to 4 different XML Files

    Hi:
    What will be a problem if I break the BIG XML file in to a number of different XML FILES?
    My main reason is to create XMLVIEW.
    Please help
    ALI_2

    Would Suite Spot Studios "AA Translator" achieve this?  If you navigate to his web site you can test the app by submitting a test project to him and he/they will attempt to "convert" it for you.  (Only one of you, you or your buddy, would need to buy and have the app installed).
    I realise this is something of a "long shot" since "suitespot" does not use a Mac and this "new" session format (.sesx) may not be readable by his app.
    Jeff

Maybe you are looking for

  • How to play HLS stream in flex

    i aim to create a flex mobile application for iOS platform,which will play videos of streaming form. as i kown,only Http Live Streaming(HLS) is supported on iOS, then how to realize the playball of video of HLS form? if i have a valid m3u8 playlist u

  • Acrobat Crashes when converting PDF to .png

    I've been having a problem for a while now. I'm using Adobe Acrobat 8.1 Pro and when I try to convert PDF to .png, acrobat crashes. It doesnt let me do it and I´ve been trying with different documents. Anyone with the same problem? It would help me a

  • Cant use some tools in tools panel

    Some tools in the tools panel are inop namely, spot healing brush, clone stamp and brushes when image is opened using Mini Bridge. Regular Bridge is OK no problem. CS5/Win7 64.

  • File which is not human readable

    Dear Friends, I want to print some confidential characters and numbers in a file so that, 1. file will not be editable by any text editor such MS-DOS editor, Notepad or Wordpad etc.. 2. file will not contain human readable characters What file writer

  • First timelabvie​w user wants to control lab instruemen​ts throught gpib??

    hey, I am an undergraduate student in my junior year. I am working in a research group at columbia universtiy for about 4 months.What theve asked me to do is that they have alot of lab instruments that they use..They want me to control them using gpi