Processing xml files

Hi all,
I am pretty new to xi. I have a business requirement, where the 3rd party will be sending us an xml file. How can I process this into XI? Can this be done in a file adapter?
Please help. thanks in advance.

Hi Paul,
You have to use File adapter to read xml file.
What is your target? Is it Idoc? RFC?
You have to create data type as per your xml structure.
Check these links for more details
[Aspirant to learn SAP XI...You won the Jackpot if you read this!-Part I|Aspirant to learn SAP XI...You won the Jackpot if you read this!-Part I]
[Aspirant to learn SAP XI...You won the Jackpot if you read this!-Part II|Aspirant to learn SAP XI...You won the Jackpot if you read this!-Part II]
[Aspirant to learn SAP XI...You won the Jackpot if you read this!-Part III|Aspirant to learn SAP XI...You won the Jackpot if you read this!-Part III]

Similar Messages

  • PL/SQL procedure to process XML file

    I am just starting to work on xml, and we are using PL/SQL stored procedures to process xml file. I did find the sample code in the package (family.sql). This sample print out all element names and attributes. My questions are :
    (1) I tried to modify the code to print out the element values (or Node values). Here is the code:
    -- get all elements and values
    nl := xmlparser.getElementsByTagName(doc, '*');
    len := xmlparser.getLength(nl);
    -- loop through elements
    for i in 0..len-1 loop
    n := xmlparser.item(nl, i);
    dbms_output.put_line('NodeName: ' | | xmlparser.getNodeName(n) | | ' ');
    dbms_output.put_line('NodeValue: ' | | xmlparser.getNodeValue(n) | | ' ');
    end loop;
    However, it did not print out the values, although it did print out the name. what's wrong with it? how can I get the value?
    (2) I have the following xml file:
    <?xml version="1.0"?>
    <profile>
    <id>1</id>
    <name>Company</name>
    <des>master profile</desc>
    <subprofile>
    <subid>1</subid>
    <subname>group1</subname>
    <subdesc>group profile</subdesc>
    </subprofile>
    </profile>
    now, I'd like to print out all the children of the <subprofile> node, that is <subid>, <subname> and <subdesc>. Here is my code:
    -- get subprofile nodelist
    qnlist := xmlparser.getElementsByTagName(doc, 'subprofile');
    -- get length of the nodelist
    len := xmlparser.getLength(qnlist);
    -- loop through elements
    for i in 0..len-1 loop
    qnode := xmlparser.item(qnlist, i);
    qnnode := xmlparser.getFirstChild(qnode);
    qnchild := xmlparser.getFirstChild(qnnode);
    dbms_output.put_line(xmlparser.getNodeName(qnnode));
    dbms_output.put_line(xmlparser.getNodeValue(qnchild));
    LOOP
    if (xmlparser.isNULL(xmlparser.getNextSibling(qnnode))) then exit;
    END IF;
    qnnode := xmlparser.getNextSibling(qnnode);
    qnchild := xmlparser.getFirstChild(qnnode);
    dbms_output.put_line(xmlparser.getNodeName(qnnode));
    dbms_output.put_line(xmlparser.getNodeValue(qnchild));
    END LOOP;
    end loop;
    when I execute the procedure, I get the following output:
    #text
    I am not sure what's wrong with it. Basically, I didn't know the procedure to traverse the tree since here it's a little different from OO programming. Could someone give a sample code which demonstrate the procedure which can get a specific element's name and values? (for my exapmle, the name and value of the <subname>, or <subid>, <subdesc>).
    Also, is there a way to insert a part of xml file into a DB table? in my case, insert the subprofile into a table. I know the xmlgen package has a procedure to insert a xml file into a table, but not a part of xml. And can I insert a xml file into several tables instead of one table, using xmlgen package?
    looking forward to hearing from you. any suggestion and sample code would be helpful. thank you very much.
    null

    I sloved my first question: to get the Nodevalue, I need to use getFirstChild(n);
    But, I still didn't figure out the second
    problem. Actually, It works when I modified my xml file as following:
    <?xml version="1.0"?>
    <profile>
    <id>1</id>
    <name>Company</name>
    <des>master profile</desc>
    <subprofile><subid>1</subid><subname>group1</subname><subdesc>groupprofile</subdesc></subprofile>
    </profile>
    All the <subprofile>....</subprofile> must be in one line without any return. This is unbelievable! It suppose that xml does not matter new lines. I tested my code, it seems space is fine, but new line. Something must be wrong in my code.
    please give any suggestion. Thanks,
    Yudong
    null

  • Problem in JAXB for processing XML files

    hello
    I have been working on a project where i need to process data in XML format. the flow goes thus
    I have 28 data elements that i need to represent as a XML so i compile the schema files and generate the class files for each of the tags and thus i can use the get and set methods to read and write to a XML file respectively(example getName and setName)......
    Now the problem is that my coding is done if i change my xml file and add say 2 more tags how do i handle it in my code.........
    1>Do i have recomplie the schema file and generate new class files every time the xml structure changes. can i avoid this recompiling process and use a one time genrated class files even if the xml structure changes.
    2>Now i have hard coded the get and set methods for processing the xml file if i add new tags to my xml i wouldnt have the get set methods for the new tags in my code(say i add a new tag as Phone then i wouldnt have the codes getPhone and setPhone called in my code and this tage was added after the coding was done)........how do i handle this situation. Is is possible that i can get and set data without using these methods and use some sort of a dynamic way of getting and setting data.............
    3>Any other approach available to meet the above requirements other than JAXB.
    Please help for the above problem
    Thank you

    hi,
    i had written a xml and schema to validate.
    my xml would be
    <output>
    <table>
    <row>
    <column></column>
    <column></column>
    </row>
    </table>
    <document>
    <properties>
    </properties>
    <contents>
    </contents>
    </document>
    <table>
    <row>
    <column></column>
    <column></column>
    </row>
    </table>
    <document>
    <properties>
    </properties>
    <contents>
    </contents>
    </document>
    <table>
    <row>
    <column></column>
    <column></column>
    </row>
    </table>
    <document>
    <properties>
    </properties>
    <contents>
    </contents>
    </document>
    </output>
    schema should validate : each table should contain atleast one row element and each row element should have atleast one column. similarly, each document should have atleast one properties and contents element.
    if any of these things occur. for ex: if there is no row element in table, i need to delete the table tag. similary if there is no properties/content or both element in document it should delete the corresponding document from the xml.
    i tried for table if there is no row element am getting the line number of the </table> tag, based on that am deleting the table element. if there is no properties tag and contents tag is there. am getting the line number for <contents>start tag, with which i could not able to delete the whole document.
    can anybody plz help me out for this requirement

  • Need help processing XML files

    I'm fairly new to Java and have never worked with XML. I need to process several XML files and display them in a matrix for comparison and I'm not sure if I need to understand SAX, DOM or some other API. I'm not creating the files, I'm just parsing them to put into a table so they can be displayed for comparison. I could be processing up to several hundreds of files, so performance would also be an issue.
    I'm just looking for options and possible areas I can begin to look for help. Can anyone tell me which APIs would help me acheive my goal?
    Any help would be greatly appreciated.
    Thanks

    Thanks for the response Kev. I guess a better diescription of the problem would be to say that I want to display the attributes and values of the differnet files in a matrix.
    For example...
    Here are 2 sample xml files with the same tags and attributes.
    XML FILE A
    <tag1 name="Fred", country="ca">
    <tag2 group-name="Group 1">
    <tag3 color ="blue">
    </tag3>
    </tag2>
    </tag1>
    XML FILE B
    <tag1 name="Sue", country="us">
    <tag2 group-name="Group 2">
    <tag3 color="red">
    </tag3>
    </tag2>
    </tag1>
    I would like to have them displayed as follows...
    XML FILE A XML FILE B
    tag1 name           Fred Sue
    tag1 country           ca us
    tag2 group-name          Group 1 Group 2
    tag3 Color          Blue     Red
    HTML tags didn't work, so the matrix is bunched together, but I think you get the idea. My question is, which would be better to use SAX or DOM. I could be running this on as many as 50 or 60 files, so the matrix could get very large and performance could be an issue as multiple users could be doing this comparison at the same time.

  • Issue while processing xml file

    Hi guys -
    I am getting error 7000 : null : com.sunopsis.sql.l: Oracle Data Integrator Timeout : connection with URL jdbc:snps:xml ...... while processing data from an xml file which is located in linux directory. I have changed the timout parameter from 30 to 500 in my client. Also modified the userpref.xml as suggested by many in forums but no use. When I checked the failed stage it shows that it gets timed out in 30 seconds. The same when i processed from my local window machine worked fine.
    Could you please help me overcome this trouble.? Please help.
    Thanks

    Hi
    You can edit userpref.xml file reside inside bin directory of ODI_HOME (oracledi folder). You need to edit the field name "value" (eg: [30] to [60]). Then restart the application and ODI Agent.
    <Object class="com.sunopsis.dwg.dbobj.SnpUserParam">
    <Field name="Key" type="java.lang.String"><![CDATA[DEFAULT_REPOSITORY_CONNECTION_TIMEOUT]]></Field>
    *<Field name="Value" type="java.lang.String"><![CDATA[30]]></Field>*
    <Field name="Label" type="java.lang.String"><![CDATA[Oracle Data Integrator Timeout]]></Field>
    <Field name="Type" type="java.lang.String"><![CDATA[com.sunopsis.graphical.userparam.SnpsTextFieldEditor]]></Field>
    <Field name="Help" type="java.lang.String"><![CDATA[Timeout used by Oracle Data Integrator for the database connections.]]></Field>
    <Field name="Visible" type="boolean"><![CDATA[true]]></Field>
    <Field name="Updatable" type="boolean"><![CDATA[true]]></Field>
    <Field name="Position" type="int"><![CDATA[4]]></Field>
    </Object>
    or increase your machine virtual memory
    Regards,
    Phanikanth

  • Processing XML File Data

    Hi,
    I have to process a XLM file data from the application server. Could anyone give me any idea how to put the XML file from application server into an internal table in a proper way? I know there is a class CL_XML_DOCUMENT, but I have never handled a XML file before.If anyone could give me a sample code (my id is [email protected]), that would be very helpful.

    check out this weblog where in the code sample i am showing how a xml file can be converted to itab using XSLT (XSLT code is also given)
    /people/durairaj.athavanraja/blog/2004/09/20/consuming-web-service-from-abap
    Usefule linkg for learning XSLT
    http://www.w3schools.com/xsl/
    http://help.sap.com/saphelp_erp2005/helpdata/en/a8/824c3c66177414e10000000a114084/frameset.htm
    also check out these packages from txn se80
    SXSLT              
    SXSLT_APP          
    SXSLT_COMP         
    SXSLT_COMPMSG      
    SXSLT_DEBUGGER     
    SXSLT_DEMO         
    SXSLT_TEST         
    SXSLT_TOOL         
    SXSLT_TRAINING     
    Regards
    Raja
    Reward the helpful answers by clicking the radiobutton and if you question is answered mark it as answered

  • Processing XML files that contain Special Characters

    Hello:
    Before I explain my problem I think I should briefly explain what I am trying to do. I have a JSP page that invokes a Java method (the code is attached). This java method takes in an XML file and an XSLT file. It parses the XSLT and also the XML file. If the parsing went through fine, it then processes the XML file and applies the XSLT to the XML file and returns a XMLDocumentFragment Object back to JSP and the JSP renders it.
    This mechanism works well. However off late I have encountered a few XML files containing characters such as &Ecirc (Capital E with circumflex accent). Whenever my Java method tries to parse/process this .xml file it gives me the following error.
    ORG.oclc.da.utilities.ifs.ReportException: An Error Occured While Parsing the Report: Missing entity 'Ecirc'.     at ORG.oclc.da.archive.userinterface.ReportHelper.retrieveReport(Unknown Source)     at /ViewReport.jsp._jspService(/ViewReport.jsp.java:87) (JSP page line 65)     at com.orionserver[Oracle9iAS (1.0.2.2) Containers for J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:54)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpApplication.serviceJSP(HttpApplication.java:5458)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.JSPServlet.service(JSPServlet.java:31)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:501)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:170)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:576)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    It seems like the Oracle Parser/XSLT Processor (oracle.xml.parser.v2.DOMParser) I am using is not able to handle special characters such &Ecirc. I was wondering if there is anyway around this problem.
    Attached is the Java Method that handles both the parsing and processing of the XML file.
    /** The method parses the Report Data and applies the Style Sheet to this data
    * @param The InputStream (Report Contents - .xml file), Name of the StyleSheet that needs to be applied
    * @return A sub-section of the report data (DOM DocumentFragment is returned)
    private XMLDocumentFragment parseReport(InputStream reportStream,String strStyleSheet) throws Exception
    DOMParser parser;
    XMLDocument xml, xsldoc, out;
    URL urlStyleSheet;
    //Get the URL for the Style Sheet
    urlStyleSheet = new URL(strStyleSheet);
    //Create an instance of the Dom Parser
    parser = new DOMParser();
    parser.setPreserveWhitespace(true);
    //Parse the XSL document and create a DOM Object
    parser.parse(urlStyleSheet);
    xsldoc = parser.getDocument();
    //Parse the report document (a .xml) and create a DOM Object
    parser.parse(reportStream);
    xml = parser.getDocument();
    // instantiate a stylesheet
    XSLStylesheet xsl = new XSLStylesheet(xsldoc, urlStyleSheet);
    XSLProcessor processor = new XSLProcessor();
    // display any warnings that may occur
    processor.showWarnings(true);
    // processor.setErrorStream(System.err);
    // Process XSL
    XMLDocumentFragment result = processor.processXSL(xsl, xml);
    return result;
    If you have any suggestions please let me know. If you need more information I will be to furnish it.
    thanks
    Mathangi

    Hello,
    I just had the same problem, you need to include the approprate entity sets so that the xsl parser will recognize them (and you won't
    get the "missing entity" error:
    if you already haven't you need to add a DOCTYPE processing instruction for your dtd, to the top of your xml files to be parsed, for ex.:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "file:///mydir/mydtd.dtd">
    then in "mydtd.dtd", add references to these 3 entity sets (if you have a dtd - if not then create one just with these entries):
    <!ENTITY % HTMLlat1 PUBLIC
    "-//W3C//ENTITIES Latin 1 for XHTML//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
    %HTMLlat1;
    <!ENTITY % HTMLspecial PUBLIC
    "-//W3C//ENTITIES Special for XHTML//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent">
    %HTMLspecial;
    <!ENTITY % HTMLsymbol PUBLIC
    "-//W3C//ENTITIES Symbols for XHTML//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent">
    %HTMLsymbol;
    Or, grab the ".ent" files from the www.w3.org site and put them on your server in the dtd dir, and change the "http:... reference, to
    "file:...", it will be faster to parse (that's what I did). FYI, "Ecirc" is in xhtml-lat1.ent.
    Also, after I did this,I developed another problem where my xsl parser and xmlmarkup tag-converting function converts certain
    html entities to their octal counterparts, and I don't want this and don't know how to stop it (I have a posting out for this also).
    Additionally, thanks for posting your parseReport method, it just so happens that I was looking for a way to do something like that,
    it should be helpful to me.
    -JK
    Hello:
    Before I explain my problem I think I should briefly explain what I am trying to do. I have a JSP page that invokes a Java method (the code is attached). This java method takes in an XML file and an XSLT file. It parses the XSLT and also the XML file. If the parsing went through fine, it then processes the XML file and applies the XSLT to the XML file and returns a XMLDocumentFragment Object back to JSP and the JSP renders it.
    This mechanism works well. However off late I have encountered a few XML files containing characters such as J (Capital E with circumflex accent). Whenever my Java method tries to parse/process this .xml file it gives me the following error.
    ORG.oclc.da.utilities.ifs.ReportException: An Error Occured While Parsing the Report: Missing entity 'Ecirc'.     at ORG.oclc.da.archive.userinterface.ReportHelper.retrieveReport(Unknown Source)     at /ViewReport.jsp._jspService(/ViewReport.jsp.java:87) (JSP page line 65)     at com.orionserver[Oracle9iAS (1.0.2.2) Containers for J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:54)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpApplication.serviceJSP(HttpApplication.java:5458)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.JSPServlet.service(JSPServlet.java:31)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:501)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:170)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:576)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    It seems like the Oracle Parser/XSLT Processor (oracle.xml.parser.v2.DOMParser) I am using is not able to handle special characters such J. I was wondering if there is anyway around this problem.
    Attached is the Java Method that handles both the parsing and processing of the XML file.
    /** The method parses the Report Data and applies the Style Sheet to this data
    * @param The InputStream (Report Contents - .xml file), Name of the StyleSheet that needs to be applied
    * @return A sub-section of the report data (DOM DocumentFragment is returned)
    private XMLDocumentFragment parseReport(InputStream reportStream,String strStyleSheet) throws Exception
    DOMParser parser;
    XMLDocument xml, xsldoc, out;
    URL urlStyleSheet;
    //Get the URL for the Style Sheet
    urlStyleSheet = new URL(strStyleSheet);
    //Create an instance of the Dom Parser
    parser = new DOMParser();
    parser.setPreserveWhitespace(true);
    //Parse the XSL document and create a DOM Object
    parser.parse(urlStyleSheet);
    xsldoc = parser.getDocument();
    //Parse the report document (a .xml) and create a DOM Object
    parser.parse(reportStream);
    xml = parser.getDocument();
    // instantiate a stylesheet
    XSLStylesheet xsl = new XSLStylesheet(xsldoc, urlStyleSheet);
    XSLProcessor processor = new XSLProcessor();
    // display any warnings that may occur
    processor.showWarnings(true);
    // processor.setErrorStream(System.err);
    // Process XSL
    XMLDocumentFragment result = processor.processXSL(xsl, xml);
    return result;
    If you have any suggestions please let me know. If you need more information I will be to furnish it.
    thanks
    Mathangi

  • XML Processing (XML file data to ABAP internal table).

    Hi,
    I have a an XML file and i need to send the data to internal table. I suppose i have written the program correctly.
    But the transformation program may not be correct.
    So can one please tell me the transformation program c o d e or guide me to write the transformation code. Below are details of XML file and my program.
    XML File
    <?xml version="1.0" encoding="UTF-8" ?>
    - <aeRequestOutputType>
    + <trackingInfo>
    + <JMSHeaders>
    - <ns:__caret_reply_caret_ZBAPI xmlns:ae="http://www.tibco.com/" xsi:type="ns:__caret_reply_caret_ZBAPI_">
    + <RETURN>
    - <T__TRADE__DATA>
    - <item>
      <BUKRS>1111</BUKRS>
      <HKONT>22222</HKONT>
      </item>
    - <item>
      <BUKRS>3333</BUKRS>
      <HKONT>44444</HKONT>
      </item>
      </T__TRADE__DATA>
      </ns:__caret_reply_caret_ZBAPI__TRADE__ACC__DOC__POST_caret_ZBAPI__TRADE__ACC__DOC__POST>
      </aeRequestOutputType>
    My Program
    REPORT  ZTEST13.
    DATA : BEGIN OF itab OCCURS 0,
              f(255) TYPE c,
         END OF itab.
    DATA : t001 TYPE TABLE OF ZTEST_ST_UB. "(structure has few variables like hkont,bukrs)
    DATA: xmlupl TYPE string .
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                       =  'c:\sap_output_xml.txt'
       FILETYPE                        = 'ASC'
      tables
        data_tab                      = itab          .
    LOOP AT itab.
    CONCATENATE xmlupl itab-f INTO xmlupl.
    ENDLOOP.
    CALL TRANSFORMATION ZTEST_ST_UB2
    SOURCE XML xmlupl
    RESULT root = t001.

    Hi,
    use class cl_xml_document and method import_from_file inorder to read the xml file to internal table.
    go trough this [LINK|http://wiki.sdn.sap.com/wiki/display/ABAP/UploadXMLfiletointernal+table] for detial code.
    Regards,
    Shanmugavel chandrasekaran

  • Webservices to process xml file

    Hi experts,
    I need develop a webservice that process a xml sended by a customer.
    how is the best way to make this?
    I will develop with J2EE and send the process result via rfc to a function module of r3.
    have any tutorial on sdn?
    thanks in advance,
    david

    Hi David,
    You may get your answers here......
    <a href="https://sdnkanab.sdn.sap.com/view/home/galaxy/html/frontpage?value=a1-3-9-7&text=WSDL&class=sdn_tech">https://sdnkanab.sdn.sap.com/view/home/galaxy/html/frontpage?value=a1-3-9-7&text=WSDL&class=sdn_tech</a>
    The above link is on SDN-> Services, so you require SDN login...
    Instead of searching for the same content in Services, you may first login into SDN and then paste the above URL in the same broswer.
    All tbe best!!
    Warm Regards,
    Ritu R Hunjan
    Message was edited by: Ritu  Hunjan

  • SAP Business Connector XML File processing

    Hi All,
    we're using SAP Business Connector to process XML Files (from NON-SAP system).
    XML-Files are mapped to IDOCs and sent to our sap-system in order to create purchase orders.
    Let's say we have 3 Purchase Orders (XML) in our SAP BC input directory,
    the first purchase order has a header text (customer field), the following 2 dont. After processing the xml-files all 3 Idocs have the same header text of the first purchase order.
    How can i change this behaviour?
    Regards
    REA

    Hello Ramy,
    You have to check this logic of t BC. if you want to check the Idocs then goto WE02 in SAP.
    if you are using message type PORDCR1 then check segment E1BPMEPOTEXTHEADER or PORDCR thne check segment E1BPEKPOTX
    Regards
    Naresh

  • Read of XML file and post to IDOC

    Hi
    I'm working on a <b>WAS620</b> and need to read an XML file from a customer, extract the fields needed and post these via IDOC ORDERS01. My problem is HOW to read the XML file? Can anyone give me the steps involved/links to examples etc - I have not processed XML files via ABAP before.
    The file is posted to a shared folder and the ABAP I am about to develop will pick up this file.
    The file is <b>NOT</b> in IDOC/XML format but the customers own format
    Hope someone can help me asap.
    Thanks all in advance
    /Bo

    Hi,
    I would like to extend this question for <b>WAS620</b> and <b>reading</b> a <b>proprietary customer specific XML</b> file/data that is <b>send via HTTP to SAP WAS</b>.
    <b>Q1</b>: What is the best way to read this HTTP sent XML data (as it is, without transformations) into ABAP?
    <b>Q2</b>: What is the appropriate handler to use in the ICF object?
    Thanks all in advance

  • XSLT and non-well formed XML file

    All,
    I am getting some "XML" feeds from some old lab equipment, however the XML isn't well formed.  Really it isn't even XML it is just a formatted text file.  So I will get a feed like the following:
    <SampleSet Label="Sample Set">
    <Name Label="Name" Value="CQS6" />
    <AnalysisDate Label="Analysis Date" Value="3/13/2015 12:20 PM" />
    <CarbonAvg Label="Carbon Avg." Value="116 ppm" />
    </SampleSet>
    <SampleSet Label="Sample Set">
    <Name Label="Name" Value="2015002301 1" />
    <AnalysisDate Label="Analysis Date" Value="3/13/2015 11:46 AM" />
    <CarbonAvg Label="Carbon Avg." Value="43.5 ppm" />
    </SampleSet>
    <SampleSet Label="Sample Set">
    <Name Label="Name" Value="2015002302 2" />
    <AnalysisDate Label="Analysis Date" Value="3/13/2015 11:53 AM" />
    <CarbonAvg Label="Carbon Avg." Value="44.4 ppm" />
    </SampleSet>
    <SampleSet Label="Sample Set">
    <Name Label="Name" Value="2015002303 3" />
    <AnalysisDate Label="Analysis Date" Value="3/13/2015 12:00 PM" />
    <CarbonAvg Label="Carbon Avg." Value="42.6 ppm" />
    </SampleSet>
    <SampleSet Label="Sample Set">
    <Name Label="Name" Value="2015002322 1" />
    <AnalysisDate Label="Analysis Date" Value="3/13/2015 12:07 PM" />
    <CarbonAvg Label="Carbon Avg." Value="32.3 ppm" />
    </SampleSet>
    <SampleSet Label="Sample Set">
    <Name Label="Name" Value="2015002323 2" />
    <AnalysisDate Label="Analysis Date" Value="3/13/2015 12:14 PM" />
    <CarbonAvg Label="Carbon Avg." Value="35.8 ppm" />
    </SampleSet>
    <SampleSet Label="Sample Set">
    <Name Label="Name" Value="2015002324 3" />
    <AnalysisDate Label="Analysis Date" Value="3/13/2015 12:27 PM" />
    <CarbonAvg Label="Carbon Avg." Value="32.4 ppm" />
    </SampleSet>
    <SampleSet Label="Sample Set">
    <Name Label="Name" Value="CQS6" />
    <AnalysisDate Label="Analysis Date" Value="3/13/2015 12:33 PM" />
    <CarbonAvg Label="Carbon Avg." Value="123 ppm" />
    </SampleSet>
    As you can see, this isn't well formed and when I try to process this via XSLT I run into all kinds of problems.  So outside of writting a program to watch for files, picking them up with a c# program, wrapping the XML to make it well formed then pass
    it to the XSLT file, is there a way that I can wrap the file using XSLT instead of having to create a separate program to make it well formed? Any help is appreciated.

    Hello katghoti,
    >>however the XML isn't well formed.  Really it isn't even XML it is just a formatted text file
    Firstly, we should know that a text file actually does not know a XML format, so I suggest that you could save the text file to a XML file. And if you provided XML is the whole content, it is not an invalid XML file because the XML document must have one
    and only one root element. You have to add root element, so a valid XML file with these SampleSet elements should be similar with below:
    <?xml version="1.0"?>
    <SampleSets>
    <SampleSet Label="Sample Set">
    <Name Label="Name" Value="CQS6" />
    <AnalysisDate Label="Analysis Date" Value="3/13/2015 12:20 PM" />
    <CarbonAvg Label="Carbon Avg." Value="116 ppm" />
    </SampleSet>
    <SampleSet Label="Sample Set">
    <Name Label="Name" Value="CQS6" />
    <AnalysisDate Label="Analysis Date" Value="3/13/2015 12:33 PM" />
    <CarbonAvg Label="Carbon Avg." Value="123 ppm" />
    </SampleSet>
    </SampleSets>
    I am not sure how you want the XML be formatted, my usual approach to format a XML file is to open the file in Visual Studio and use ctrl K+D keyboard shortcuts to format the XML file.
    >>is there a way that I can wrap the file using XSLT instead of having to create a separate program to make it well formed?
    XSLT is used to process XML file, while you provided file is a text file, it does not recognize it.
    If I misunderstand, please feel free to let me know.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Large XML files, how to split and read them in PI

    Hi,
    For a specific requirement, we have a 60 MB-90 MB XML file being generated by a legacy application.
    This file has to be processed by PI 7.31 Sender File Adapter and should be posted as a ABAP proxy to SAP ECC system.
    To address any performance issues, we are planning to read the files in chunks.
    Is there a way by which we can configure the file adapter to pick a fixed no.of records to limit the size.
    In inputs in this regard will be appreciated.
    regards,
    Younus

    Hi Younus,
    First of all if you are using PI 7.31, then you should be quite able to process XML file of about 100MB scale. Performance issue shall occur in ECC side instead as it can not handle such high volume.
    My suggestion will be to pick the whole XML file at one go and do necessary mapping. However on receiver side use SOAP Adapter instead of XI for making proxy calls to ECC.
    In SOAP adapter (using HTTP as Transport and XI 3.0 as Message protocol) there's an option as 'XI Packaging' which can be used to send data in packets.
    Refer below help doc on it.
    Configuring the Receiver SOAP Adapter - Advanced Adapter Engine - SAP Library
    Thanks
    Bibek

  • OUTBOUND XML FILE CONTAINS SPECIAL CHARS AFTER SP08 UPGRADE

    Experts,
    Recently MDM server upgraded to SP08 from SP05.
    In our outbound interface scenario we have 1 hierarchy field. The hierarchy field mapped as complete path(parent to Child)
    ex: 1,Parent > 11,Child > 111,Child > 1111,Child.
    In SP05 XML files are generating correctly & PI also dont have any issues while passing this data to ECC.
    After SP08 Server pack upgrade, xml file generating like  below:
    1??, ??Parent??, ???>?11??, ??Child??, ???>?111??, ??Child??, ???>?1111??, ??Child??, ???
    If open the xml file in non ASCC editor I could able to see these special chars. Due to this ISSUE PI could not processing xml files.
    All XML files are failing& blocking in PI.
    Could you let me know what needs to be done at MDM or PI level.
    Appreciate your inputs.
    Thanks
    Audinarayana

    Hello,
    Please check the Destination preview in the syndicator.
    So an syndication on the local machine, open the XML in an Browser, to see check for the special characters.
    If every things is ok, then just place the file in the outbound ready folder.
    If not then, raise an OSS message with SAP, as this a latest release, error resolution would be best provided by SAP
    Regards,
    Abhishek

  • WCF-NET TCP Error when processing X12 file

    Hi ,
    Is it that WCF-NET TCP adapter only processes Xml file? I am trying to send x12 message through Send port wth Passthrough  Pipeline and Net-Tcp configuration, but fails for invalid root node error: (below)
    Send Port is subscribing to a Receive Port which has pass through on receive with File adapter ( I don't want to do EDI receive when receiving this file - just to convert it to Xml)
    A message sent to adapter "WCF-NetTcp" on send port "port......._InputPassThru_snd" with URI "net.tcp://localhost:808/totemp" is suspended.
    Error details: System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.
       at System.Xml.XmlTextReaderImpl.Throw(Exception e)
       at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
       at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
       at System.Xml.XmlTextReaderImpl.ParseDocumentContent()

    The thing is, if you're using the WCF Net-TCP adapter, the receive is expecting a SOAP formatted message over TCP.  The Net-TCP binding is 'binary' because there is no encoding layer, but the message is still SOAP.
    If you really need to send binary data over TCP, you would use the BizTalk TCP/IP Adapter from CodePlex:
    http://tcpipbz2010.codeplex.com/

Maybe you are looking for

  • Customer Exit Variable in cell definition in BEx

    Hi, I have defined a query with a Structure in Row and Key Figures in column. The result of query should look like this: Fiscal/Year Period | Quantity per month | Quantity cumulative 011.2010 (Variable Offset Value -3) | 5 | 5 012.2010 (Variable Offs

  • Retrieving Sender Query Details in via BADI (SMOD_RSR00004)

    Hi SDN Community, thanks to a posting by Jim, i have got some of the information i require from the below code. *     Jim Langerhuizen / July 6 2007 *     Replace Controlling Area 1000 with hard coded values Z001 and Z002 for Report My question is ho

  • Password protecting a Flash Drive?

     When I plug in my FlashDrive it opens up a Disk Image, I was wondering if it is at all possible to set up that Disk Image as a Password Protected disk image? So when I insert the Flash Drive it will prompt me for a password and then open. I am star

  • Do you think middleware or XIF adapter is based on SOA?

    Hi, For current CRM 5.0 version, do you think middleware XIF adapter is based on SOA? Or classic tech.? How about it in new CRM?

  • Default Image

    Hi guys! I have a problem that I can´t solve. I am creating a news script with php and mysql and my problem is that I can´t figure out how to set up a default image for posts that haven´t got a image to add so it would display instead so the field wo