How to read elements in a xml file sent as a string

Hi,
I am new to BPEL and i am working on a requirement where i receive the XML message as a String from an AQ. And I am not able parse the xml to read the individual elements of it. Appreciate your help on this.
The (sample)input message from Q is which i am able to see in the BPEL console:
<BUGINFO_XML>
<XML_MESSAGE>
<?xml version="1.0"?>
<BUGINFO>
<SR_ID>3-29OU7OF</SR_ID>
<OBJECT_TYPE>UPDATE_PREBUG</OBJECT_TYPE>
<RESERVED_BUG_NUM>8221084</RESERVED_BUG_NUM>
<TYPE>Predefect Update</TYPE>
<AUDIENCE>INTERNAL</AUDIENCE>
<COMMENT>TEST activity by Sireesha</COMMENT>
</BUGINFO>
</XML_MESSAGE>
</BUGINFO_XML>
and the corresponding xsd file is:
<schema targetNamespace="http://xmlns.oracle.com/xdb/ORIONCC"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:ORIONCC="http://xmlns.oracle.com/xdb/ORIONCC"
elementFormDefault="unqualified" attributeFormDefault="qualified">
<complexType name="BUGINFO_XML">
<sequence>
<element name="XML_MESSAGE" type="string" nillable="true" minOccurs="0"/>
</sequence>
</complexType>
<element name="BUGINFO_XML" type="ORIONCC:BUGINFO_XML" />
</schema>
i have created a variable(called VariableXML) of element type of the above xsd type({http://xmlns.oracle.com/xdb/ORIONCC}BUGINFO_XML) and using ora:parseEscapedXML method, i copied the input data to this variable and i can see the data copied fine to this variable, but after that i am not able to traverse to the individual element of it say i want the value of SR_ID which i am not able to get.
<VariableXML>
<BUGINFO_XML>
<SR_ID>3-29OU7OF</SR_ID>
<OBJECT_TYPE>UPDATE_PREBUG</OBJECT_TYPE>
<RESERVED_BUG_NUM>8221084</RESERVED_BUG_NUM>
<TYPE>Predefect Update</TYPE>
<AUDIENCE>INTERNAL</AUDIENCE>
<COMMENT>TEST activity by Sireesha</COMMENT>
</BUGINFO_XML>
</VariableXML>
When i see the structure of this variable in the Assign activity i can see only up to '/ns2:BUGINFO_XML/XML_MESSAGE' but not the individual elements.
Please let me know how can i parse this xml to read the elements of it.
I am using jdev 11.1.1.4 and weblogic 10.3
Thanks,
Sireesha
Edited by: user12217808 on Jul 27, 2012 7:10 AM

Thanks for replying Tarak,
I have taken the XML generated by VariableXML variable and generated a XSD out of it and that looks like below.
<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.example.org"
targetNamespace="http://www.example.org"
elementFormDefault="qualified">
<xsd:element name="BUGINFO_XML">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="SR_ID" type="xsd:string"/>
<xsd:element name="OBJECT_TYPE" type="xsd:string"/>
<xsd:element name="RESERVED_BUG_NUM" type="xsd:integer"/>
<xsd:element name="TYPE" type="xsd:string"/>
<xsd:element name="AUDIENCE" type="xsd:string"/>
<xsd:element name="COMMENT" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Then I have created a variable called VariableBugInfo of this element type ({http://www.example.org}BUGINFO_XML) and tried parsing it as below.
<assign name = 'Assign2'>
<copy>
<from expression="oraext:parseXML(bpws:getVariableData('VariableXML','/ns2:BUGINFO_XML'))"/>
<to variable="VariableBugInfo" query="/ns4:BUGINFO_XML"/>
</copy>
</assign>
then i got the below error in the bpel console when im testing my bpel process.
The following exception occurred while attempting to execute operation copy at line 118
<?xml-stylesheet href="chrome://global/locale/intl.css" type="text/css"?>
-<parsererror>
XML Parsing Error: junk after document element
Location: http://slce26vm164.us.oracle.com:7001/em/ai/sca/share/audit/nfdg/displayInstance.jsp?locatorobjkey=Farm_mosbpelmosbpelsoa_server1soa-infra&instanceid=bpel%3A70555
Line Number 7, Column 1:
<sourcetext>
<root class="javax.xml.xpath.XPathExpressionException">internal xpath error<stack><f>oracle.xml.xpath.JXPathExpression.evaluate#242</f><f>com.collaxa.cube.xml.xpath.BPELXPathUtil.evaluate#240</f><f>com.collaxa.cube.engine.ext.bpel.common.BPELWMPHelper.evalFromValue#339</f><f>com.collaxa.cube.engine.ext.bpel.v1.wmp.BPEL1AssignWMP.__executeStatements#137</f><f>com.collaxa.cube.engine.ext.bpel.common.wmp.BaseBPELActivityWMP.perform#158</f><f>com.collaxa.cube.engine.CubeEngine._performActivity#2463</f><f>com.collaxa.cube.engine.CubeEngine.performActivity#2334</f><f>com.collaxa.cube.engine.CubeEngine.handleWorkItem#1115</f><f>com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal#73</f><f>com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage#220</f><f>com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory#328</f><f>com.collaxa.cube.engine.CubeEngine.endRequest#4350</f><f>com.collaxa.cube.engine.CubeEngine.endRequest#4281</f><f>com.collaxa.cube.engine.CubeEngine.createAndInvoke#679</f><f>com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke#654</f><f>com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke#293</f><f>...</f></stack></root>
^
</sourcetext>
</parsererror>
but when i tried a normal copy from VariableXML BUGINFO to VariableBugInfo as below, i am not getting any error but its not actually copying the contents to individual tags, because after this Assign i created a simple string variable(objTypeVar) and when i tried to copy TYPE element value to it, it says 'The result is empty for the XPath expression : "/ns4:BUGINFO_XML/ns4:TYPE".'
<assign name="Assign2">
<copy>
<from variable="VariableXML" query="/ns2:BUGINFO_XML"/>
<to variable="VariableBugInfo" query="/ns4:BUGINFO_XML"/>
</copy>
</assign>
<assign name="Assign3">
<copy>
<from variable="VariableBugInfo"
query="/ns4:BUGINFO_XML/ns4:TYPE"/>
<to variable="objTypeVar"/>
</copy>
</assign>
Result in console for VariableBugInfo for Assign2:
<VariableBugInfo>
<BUGINFO_XML>
<SR_ID>3-29OU7OF</SR_ID>
<OBJECT_TYPE>UPDATE_PREBUG</OBJECT_TYPE>
<RESERVED_BUG_NUM>8221084</RESERVED_BUG_NUM>
<TYPE>Predefect Update</TYPE>
<AUDIENCE>INTERNAL</AUDIENCE>
<COMMENT>TEST activity by Sireesha</COMMENT>
</BUGINFO_XML>
</VariableBugInfo>
For Assign 3:
Error in evaluate <from> expression at line "141". The result is empty for the XPath expression : "/ns4:BUGINFO_XML/ns4:TYPE".
I feel there is something i am missing in the XSD and the target namespace which is causing the issue. I am not sure what i should provide in the target namesapce in the new xsd which i created based on the value of VariableXML , so that it actually parses the xml and copies exact elements of it.
Please let me know if i am doing something wrong anywhere.
Thanks,
Sireesha

Similar Messages

  • How to read the contents of XML file from my java code

    All,
    I created an rtf report for one of my EBS reports. Now I want to email this report to several people. Using Tim's blog I implemented the email part. I am sending emails to myself based on the USERID logic.
    However I want to email to different people other then me. My email addresses are in the XML file.
    From the java program which sends the email, how can I read the fields from XML file. If any one has done this, Please point me to the right examples.
    Please let me know if there are any exmaples/BLOG's which explain how to do this(basically read the contents of XML file in the Java program).
    Thank You,
    Padma

    Ike,
    Do you have a sample. I am searched so much in this forum for samples. I looked on SAX Parser. I did not find any samples.
    Please help me.
    Thank you for your posting.
    Padma.

  • How to read/interpret data in xml files

    Hi,
    I am trying to write a program using DOM to read an xml file - that doesn't have a dtd. My aim is to get the node names and the content enclosed in the node. The xml I have is something like:
    <ARTICLE>
    <TITLE>
    </TITLE>
    <DESCRIPTION>
    </DESCRIPTION>
    <SYNOPSIS>
    </SYNOPSIS>
    <SOURCE>
    <FOOT>
    </FOOT>
    </SOURCE>
    <PARA>
    </PARA>
    <PARA>
    </PARA>
    <PARA>
    </PARA>
    </ARTICLE>
    My java code thus far is:
    public class Word2dmt {
    String fileExt = "";
    int fileNameLength = 0;
    public void Word2dmt(){
    // Default constructor
    public void processFiles(){
    String fileName = "";
    String filePath = "/MyProjects/FOP/word2dmt/";
    String[] files = null;
    File dirWhereXmlFilesAre = null;
    Document document;
    DocumentBuilder builder = null;
    try {
    dirWhereXmlFilesAre = new File(filePath);
    files = dirWhereXmlFilesAre.list();
    } catch (IllegalArgumentException iae) {
    Log.message("Caught iae: " + iae.getMessage());
    DocumentBuilderFactory factory =
    DocumentBuilderFactory.newInstance();
    // factory.setValidating(true);
    // factory.setNamespaceAware(true);
    try{
    builder = factory.newDocumentBuilder();
    } catch (ParserConfigurationException pce) {
    // Parser with specified options can't be built
    pce.printStackTrace();
    for (int z = 0; z < files.length; z++){
    fileName = filePath + files[z];
    fileNameLength = fileName.length();
    fileExt = fileName.substring(fileName.indexOf(".") + 1,
    fileNameLength);
    if(fileExt.equalsIgnoreCase("xml")){
    try {
    document = builder.parse(new File(fileName));
    if(document.hasChildNodes()){
    NodeList nodes = document.getChildNodes();
    processNodes(nodes);
    } catch (SAXParseException spe) {
    // Error generated by the parser
    System.out.println("\n** Parsing error" + ", line " +
    } catch (SAXException sxe) {
    // Error generated during parsing)
    } catch (FileNotFoundException fnf) {
    Log.message("The file: " + fileName + " is not found");
    } catch (IOException e) {
    Log.message("IOexception: " + e.getMessage());
    } // Ends the main for loop on the files
    public static void main(String[] args) {
    Word2dmt w2dmt = new Word2dmt();
    w2dmt.processFiles();
    } // end main()
    public void processNodes(NodeList nodes){
    Node thisNode = null;
    NamedNodeMap nodeMap = null;
    Element curElement = null;
    int numNodes = nodes.getLength();
    String nodeValue = "";
    String nodeName = "";
    String localName = "";
    String prefix = "";
    for(int j = 0; j < numNodes; j++){
    thisNode = (Node) nodes.item(j);
    if(thisNode.hasChildNodes()){
    processNodes(thisNode.getChildNodes());
    } else {
    nodeValue = thisNode.getNodeValue();
    nodeName = thisNode.getNodeName();
    Log.message("\t\t" + "nodeName is: " + nodeName);
    Log.message("\t\t" + "nodeValue is: " + nodeValue);
    When I try to print the node name, all I get is: "#test" except for the node ARTICLE, which happens to be the root node. My requirement is that I need the node name (TITLE, SYNOPSIS, DESCRIPTION ..etc) and be able to associate the content in other areas of my larger program. I tried almost all the methods of the class org.w3c.dom.Node, but without luck.
    Any help is appreciated.
    Thanks.
    - Sharma

    When I try to print the node name, all I get is: "#test"I think if you look more carefully you'll see it really says "#text". That's the "name" of a text node, of which you have a lot there. Also, if a node has children then you aren't printing its name, that's why you miss most of your elements.

  • How to read a very BIG XML-File

    Hello together,
    how can I read a XML file of e.g. 2 GByte in ABAP ( Release 4.6C ). The file should be read from the Application-Server ( not from the Front-End ).
    Problem: Too much MEMORY is needed by the upload of the complete file into an internal table. In order to produce a stream, the complete file must be uploaded. The parser works with parse_event ( Event-triggered ) and is not creating a DOM. The parsing itself is no problem.
    Possible solution: Feed the stream with parts of the file. But how !?
    Here is some coding of the program:
      data: l_xml_filename    type localfile,
            l_event_sub       type i,
            l_boolean         type c,
            l_subrc           type i.
    Datei mit Größe in XML-Tabelle einlesen:
    l_xml_filename = 'I:TEMPGeboIsp-PSGK37.xml'.
      perform read_file_in_xml_table using    p_xml_filename
                                     changing g_xml_table
                                              g_xml_size.
    XML-Dokument aus Tabelle bilden:     =========================
    iXML factory erzeugen:
      go_ixml = cl_ixml=>create( ).
    stream factory erzeugen:
      p_streamfactory = go_ixml->create_stream_factory( ).
    XML-Dokument erzeugen:
      p_xml_document = go_ixml->create_document( ).
    Input-Stream erzeugen:
      p_istream = p_streamfactory->create_istream_itable(
                          table = g_xml_table
                          size  = g_xml_size ).
      p_parser = go_ixml->create_parser( stream_factory = p_streamfactory
                                         istream        = p_istream
                                         document       = p_xml_document ).
      l_event_sub = if_ixml_event=>co_event_element_pre +
                    if_ixml_event=>co_event_element_post.
      call method p_parser->set_event_subscription( l_event_sub ).
      l_boolean = p_parser->set_dom_generating( ' ' ).
    The program works fine but needs too much memory because of the big internal table.
    I would be very happy if somebody could help me!
    Thanks in advance!
    Thomas
    P.s.: German answers are welcome!  
    Message was edited by:
            Thomas13 Scheuermann
    Message was edited by:
            Thomas13 Scheuermann

    Hello myself,
    nobody has answered my question, so now I answer myself!!  
    The wrong part is to read the file with "open dataset" and to create the inputstream with
    p_istream = p_streamfactory->create_istream_itable(
    table = g_xml_table
    size = g_xml_size ).
    Better ist to create the inputstream with
    p_istream = p_streamfactory->create_istream_uri(
    .......................PUBLIC_ID = ''
    .......................SYSTEM_ID = '
    applserver\I$\TEMP\Datei.XML' ).
    In this way no space is needed for the file.
    Best regards,
    Thomas
    Message was edited by:
            Thomas13 Scheuermann

  • How to read the data from XML file and insert into oracle DB

    Hi All,
    I have below require ment.
    I will receive data in the XML file. then i need to read that data and insert into oracle tables. please let me know how this can be handled.
    Many Thanks.

    Sounds a lot like this question, only with less details.
    how to read data from XML  variable and insert into table variable
    We can only help if you provide us details to help as we cannot see what you are doing and only know what you tell us.  Plenty of examples abound on the forums that cover the topics you seek as well.

  • HOW to read CLOB and create XML file on UNIX/LINUX

    Hi,
    Could you please let me know, how to read CLOB using ADODB. I have column CLOB type on Oracle 9.2, with content of whole XML type. I am unable to retreive more than 4k. I use adLongVarChar. So I have written Oracle stored procedure to read the clob and create XML file using DBMS_LOB package and UTL_FILE package, still no joy.
    Please help.
    example of my XML file is:
    <EXAMPLE><HEADER><VERSION>1.0</VERSION><TEMPLATE>XXXX</TEMPLATE><TAG1>CON</TAG1></HEADER><BODY><TAG2>X1</TAG2><OFFICE>assad</OFFICE><CREATE_DATE>27/02/2006 10:55</CREATE_DATE><SOURCE></SOURCE></BODY><FIXEDTABLE1><TABLEROW1COL1>asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd</TABLEROW1COL1><TABLEROW1COL2></TABLEROW1COL2><TABLEROW2COL1></TABLEROW2COL1><TABLEROW2COL2></TABLEROW2COL2><TABLEROW3COL1></TABLEROW3COL1><TABLEROW3COL2></TABLEROW3COL2><TABLEROW4COL1>asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd</TABLEROW4COL1><TABLEROW4COL2></TABLEROW4COL2><TABLEROW5COL1></TABLEROW5COL1><TABLEROW5COL2></TABLEROW5COL2></FIXEDTABLE1><CHECKBOX><CHECKBOX1>False</CHECKBOX1><CHECKBOX2>False</CHECKBOX2><CHECKBOX3>False</CHECKBOX3><CHECKBOX4>False</CHECKBOX4><CHECKBOX5>False</CHECKBOX5><CHECKBOX6>False</CHECKBOX6><CHECKBOX7>False</CHECKBOX7><CHECKBOX8>False</CHECKBOX8><CHECKBOX9>False</CHECKBOX9></CHECKBOX></EXAMPLE>
    My STored Procedure:
    ftypFileHandle := UTL_FILE.fopen ('XML_DIR_FILE', vFileName, 'w', 32000);
    lMarker := 'Selecting XML row';
    println(lMarker, 2);
    SELECT XML_FILE
    INTO clobBuffer
    FROM XML_TABLE
    WHERE x=1;
    lMarker := 'Get length of the clob';
    iClobLength := nvl(DBMS_LOB.getlength(clobBuffer), 0);
    WHILE (l_offset <= iClobLength) LOOP
    DBMS_LOB.READ (
    lob_loc=> clobBuffer,
    amount=> l_amt,
    offset=> l_offset,
    buffer=> vOutputBuffer
    UTL_FILE.put (ftypFileHandle, vOutputBuffer);
    UTL_FILE.fflush (ftypFileHandle);
    UTL_FILE.new_line (ftypFileHandle);
    l_offset := l_offset + l_amt;
    END LOOP;
    lMarker := 'Close file';
    println(lMarker, 2);
    UTL_FILE.fclose (ftypFileHandle);
    Thanks

    Hello myself,
    nobody has answered my question, so now I answer myself!!  
    The wrong part is to read the file with "open dataset" and to create the inputstream with
    p_istream = p_streamfactory->create_istream_itable(
    table = g_xml_table
    size = g_xml_size ).
    Better ist to create the inputstream with
    p_istream = p_streamfactory->create_istream_uri(
    .......................PUBLIC_ID = ''
    .......................SYSTEM_ID = '
    applserver\I$\TEMP\Datei.XML' ).
    In this way no space is needed for the file.
    Best regards,
    Thomas
    Message was edited by:
            Thomas13 Scheuermann

  • How to read the attributes of XML file

    Hi this is ant,
    I am new to java, XML, I have a senario
    1) I have to read all the href attributes for topicref child, and then read the corresponding xml file which is mapped in href="".
    First.xml
    <map>
    <topicref nav="garage" href="task/gar/view.xml" class="..">
    <linktext class="_map/linktext">Garage</linktext>
         <topicref nav="" href="task/gar/change.xml" ..>
    <linktext class="_map/linktext">Garage</linktext>
    </topicref>
    </linktext>
    </topicref>
    </map>
    2) task/gar/view.xml file , has id attribute & need to get the id values.
    Like this I have to get the id values for all the href attributes of first xml & read correspoding id values.
    I have just read some doc using XPATH we can do, please help me.
    Thanks.
    anto

    * Try this Link, there is solution
    http://forums.sun.com/thread.jspa?messageID=9665228
    Can...Can...If we try...!

  • How to remove element namespaces in XML file using DOM or SAX?

    Hi Guys,
    I developed a JAVA mapping in XI to add name spaces for XML file, after mapping,name spaces xmlns="http://www.mro.com/mx/integration" and xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" were added correctly, but for some nodes, such as <Header> and <Content>, a name space xmlns="" was added automatically.Please check below files to compare.
    It looks like be added automatically by XI. I didn't process anything for these nodes in JAVA program.
    Now the issue is, how can I remove these redundant namespaces? Such as xmlns="".
    Can I remove them using DOM or SAX in JAVA Mapping?
    Thanks in advance.
    ====>Original XML file
    <?xml version="1.0" encoding="UTF-8"?>
    <LLYLPPInterface language="EN">
       <Header>
          <SenderID>GBIP</SenderID>
          <CreationDateTime>2008-02-13T22:49:34-05:00</CreationDateTime>
          <RecipientID/>
          <MessageID/>
       </Header>
       <Content>
          <LLY-LPP>
             <INVOICE>
                <INVOICELINE>
                   <PONUM>4780000008</PONUM>
                   <POLINENUM>1</POLINENUM>
                   <INVOICEQTY>1</INVOICEQTY>
                   <LOADEDCOST>68</LOADEDCOST>
                </INVOICELINE>
             </INVOICE>
          </LLY-LPP>
       </Content>
    </LLYLPPInterface>
    ===>Target XML file after JAVA mapping
    <?xml version="1.0" encoding="utf-8"?>
    <LLYLPPInterface language="EN" xmlns="http://www.mro.com/mx/integration" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <Header xmlns="">
              <SenderID>GBIP</SenderID>
              <CreationDateTime>2008-02-13T23:11:55-05:00</CreationDateTime>
              <RecipientID/>
              <MessageID/>
         </Header>
         <Content xmlns="">
              <LLY-LPP>
                   <INVOICE>
                        <INVOICELINE>
                             <PONUM>4780000008</PONUM>
                             <POLINENUM>0</POLINENUM>
                             <INVOICEQTY>1</INVOICEQTY>
                             <LOADEDCOST>68</LOADEDCOST>
                        </INVOICELINE>
                   </INVOICE>
              </LLY-LPP>
         </Content>
    </LLYLPPInterface>
    Edited by: Eddie Zhang on Feb 14, 2008 9:22 AM
    Edited by: Eddie Zhang on Feb 14, 2008 9:24 AM

    Hi Milan,
    Thanks for your replay.
    Actually when I used module XMLAnonymizerBean to convert namespaces, the header of XML, such as <?xml version="1.0" encoding="UTF-8"?> was converted to format <?xml version='1.0' encoding='UTF-8'?>, quote was converted to single quote. Although I set parameter anonymizer.quote = ", it still didn't work, single quote appeared instead of quote.
    I'm not sure why this happened. Can anyone help to clarify this?
    Thanks
    Edited by: Eddie Zhang on Feb 15, 2008 2:11 AM

  • How to update/change the value of elements in an xml file?

    Hi Everyone,
    Could any one of u tell me how to update the value of elements in an XML file, using java? The reason is i want to use an XML file as a data source (i.e. more or less like a database), without using any RDBMS, for simple applications such as to read a record and update the record. By the way, my XML file will have only one record, such as the current weather information, with fields such as temperature, humdity etc. for 1 city only.
    Thanks in advance.

    Here is a solution how to check a particular value or element name in an xml and update the changes e to an xml.
    Sample.xml
    <URLConstructor>
    <application name="cp_outage">
    <resource>hello</resource>
    <value>val</value>
    </application>
    <application name="cp_outage">
    <resource>hello</resource>
    <value>val</value>
    </application>
    </URLConstructor>
    XMLWriter.java
    package com;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.jdom.Document;
    import org.jdom.Element;
    import org.jdom.JDOMException;
    import org.jdom.input.DOMBuilder;
    import org.jdom.output.XMLOutputter;
    // used for printing
    import org.apache.xml.serialize.XMLSerializer;
    import org.jdom.output.XMLOutputter;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.OutputStream;
    import java.util.Iterator;
    import java.util.List;
    class XMLWriter{
    public void update(File fileName)
    try {
              DOMBuilder domBuilder=new DOMBuilder();
              Document doc=domBuilder.build(fileName);
              Element element=doc.getRootElement();
              getChildren(element);
              writeToXML(doc,fileName);
              getChildren(element);
    } catch (Exception e) {
    e.printStackTrace();
         * @param doc
         private void writeToXML(Document document,File filePath)
                   XMLOutputter xmloutputter = new XMLOutputter();
                        try
                             FileOutputStream fileOutputStream = new FileOutputStream(filePath);
                             xmloutputter.output(document, fileOutputStream);
                             fileOutputStream.close();
                        catch (FileNotFoundException e)
                             e.printStackTrace();
                        catch (IOException e)
                             e.printStackTrace();
         public void getChildren(Element element)
                        if(!element.hasChildren())
                             return;
                        List childrenList = element.getChildren();
                        Iterator itr=childrenList.iterator();
                        while(itr.hasNext())
                             Element childElement=(Element) itr.next();
                             if(childElement.hasChildren())
                                       getChildren(childElement);
    //                                   System.out.println("Name "+childElement.getName());
    //                                   System.out.println("Value "+childElement.getText());
                                       if(childElement.getText().equals("hello") || (childElement.getName().equals("resource")))
                                            updateInfo(childElement,"New_Resource","AddedText");
         * @param childElement
         * @param string
         * @param string2
         private void updateInfo(Element element, String elementName, String value)
              element.setName(elementName);
              element.setText(value);          
    static public void main(String[] args)
    XMLWriter xmlWriter=new XMLWriter();
    xmlWriter.update(new File("c:/sample.xml"));
    After execution the file will be changed to
    <URLConstructor>
    <application name="cp_outage">
    <New_Resource>AddedText</New_Resource>
    <value>val</value>
    </application>
    <application name="cp_outage">
    <New_Resource>AddedText</New_Resource>
    <value>val</value>
    </application>
    </URLConstructor>
    Regards,
    Maheswar

  • How to read the data from Excel file and Store in XML file using java

    Hi All,
    I got a problem with Excel file.
    My problem is how to read the data from Excel file and Store in XML file using java excel api.
    For getting the data from Excel file what are all the steps i need to follow to get the correct result.
    Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
    Thanks & Regards,
    Sreenu,
    [email protected],
    india,

    If you want someone to do your work, please have the courtesy to provide payment.
    http://www.rentacoder.com

  • How to convert DOM Tree in XML File

    Hi there,
    I am successful to build a DOM tree in memory where i am adding elements. Now after all this i want to make a XML file of that DOM representation. Now, i am confused with my code that how to transfer DOM structure to xml file ? A small code is attached herewith ?
    doc = db.newDocument();
                   doc.normalizeDocument();
                   doc.setXmlVersion("1.0");
                   doc.createComment("Created By: Sachin Kulkarni");
                   Element rn = doc.createElement("RootNode");
                   Element n1 = doc.createElement("A1");
                   ((Node)n1).setNodeValue("Element A1");
                   Element n11 = doc.createElement("A11");
                   ((Node)n11).setNodeValue("Element A11");
                   Element n12 = doc.createElement("A12");
                   ((Node)n12).setNodeValue("Element A12");
                   ((Node)n1).appendChild( ((Node)n11) );
                   ((Node)n1).appendChild( ((Node)n12) );
                   Element n2 = doc.createElement("A2");
                   ((Node)n2).setNodeValue("Element A2");
                   Element n3 = doc.createElement("A3");
                   ((Node)n3).setNodeValue("Element A3");
                   ((Node)rn).appendChild( ((Node)n1) );
                   ((Node)rn).appendChild( ((Node)n2) );
                   ((Node)rn).appendChild( ((Node)n3) );
    //creating the xml file
                   Source source = new DOMSource((Element) doc.getElementsByTagName("RootNode").item(0));
                   StringWriter out = new StringWriter();
                   StreamResult result = new StreamResult(out);
                   Transformer transformer = TransformerFactory.newInstance().newTransformer();
                   transformer.setOutputProperty("encoding", "iso-8859-1");
                   transformer.setOutputProperty("indent", "yes");
                   //transformer.setOutputProperty("test.xml","1");
                   //transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
                   transformer.transform(source,result);
                   result.getWriter().toString();
    ==================
    Is it any problem with the implementation ? How to use fileoutputstream with this ?

    I have done like this:
    DocumentBuilderFactory docBuildFactory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = docBuildFactory.newDocumentBuilder();
    Document doc = builder.newDocument();
    Element root = (Element)doc.createElement("Root");
    doc.appendChild(root);
    Element address = (Element)doc.createElement("Address");
    address.appendChild((Element)doc.createElement("Street"));
    address.appendChild((Element)doc.createElement("PostCode"));
    address.appendChild((Element)doc.createElement("Town"));
    Element country = (Element)doc.createElement("Country");
    country.setAttribute("type","EU");
    Text cname = doc.createTextNode("Spain");
    country.appendChild(cname);
    address.appendChild(country);
    root.appendChild(address);
    TransformerFactory tranFactory = TransformerFactory.newInstance();
    Transformer aTransformer = tranFactory.newTransformer();
    aTransformer.setOutputProperty(OutputKeys.INDENT, "yes");
    Source src = new DOMSource(doc);
    Result dest = new StreamResult(new FileOutputStream(new File("test.xml")));
    aTransformer.transform(src, dest);

  • How-to use Excel for the XML file input?

    Hello all,
    Following our discussion with Gerhard Steinhuber on the very nice tutorial from Horst Schaude , "How to upload mass data via XML File Input" , I am starting this new discussion.
    In the comments section of this previous cited tutorial, Rufat Gadirov explains how to use a generated XML from Eclipse instead of your XSD file as your source in Excel.
    However, in spite of all the instructions, I am still facing the same issue in Excel when I try to save my file as XML : "The XML maps in this workbook are not exportable".
    What I try to do is to create one or more Sales Orders with multiple Items in it from a XML File Input, using excel to enter data.
    The part with the File input is working (if I directly upload my file to the webDAV, it creates a sales order instance with multiple items).
    The only missing part is the Excel data input that I cannot make work. Any help on this matter would be greatly appreciated.
    Here is my XML file that I try to use as a source in Excel before inputing data from Excel:
    <?xml version="1.0" encoding="UTF-8"?>
    <p:MySalesOrderUploadedIntegrationInputRequest xmlns:p="http://001365xxx-one-off.sap.com/YUUD0G3OY_" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <MessageHeader>
        <CreationDateTime>2015-03-02T12:00:00.000Z</CreationDateTime>
    </MessageHeader>
        <List actionCode="01" listCompleteTransmissionIndicator="true" reconciliationPeriodCounterValue="0">
            <MySalesOrderUploaded>
              <MySalesOrderUploadedID>idvalue0</MySalesOrderUploadedID>
              <MyBuyerID schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeID="token">token</MyBuyerID>
              <MyDateTime>2015-03-02T12:00:00.000Z</MyDateTime>
              <MyName languageCode="EN">MyName</MyName>
              <MyBillToParty schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeAgencySchemeID="token" schemeID="token">token</MyBillToParty>
              <MyDateToBeDelivered>2001-01-01</MyDateToBeDelivered>
              <MyEmployeeResponsible schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeAgencySchemeID="token" schemeID="token">token</MyEmployeeResponsible>
              <MySalesUnit schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeAgencySchemeID="token" schemeID="token">token</MySalesUnit>
                <MyItem>
                    <MyItemID>token</MyItemID>
                    <MyItemProductID schemeAgencyID="token" schemeID="token">token</MyItemProductID>
                    <MyItemDescription languageCode="EN">MyItemDescription</MyItemDescription>
                    <MyProductTypeCode>token</MyProductTypeCode>
                    <MyRequestedQuantity unitCode="token">0.0</MyRequestedQuantity>
                    <MyConfirmedQuantity unitCode="token">0.0</MyConfirmedQuantity>
                    <MyNetAmount currencyCode="token">0.0</MyNetAmount>
                </MyItem>
            </MySalesOrderUploaded>
            <MySalesOrderUploaded>
              <MySalesOrderUploadedID>idvalue0</MySalesOrderUploadedID>
              <MyBuyerID schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeID="token">token</MyBuyerID>
              <MyDateTime>2015-03-02T12:00:00.000Z</MyDateTime>
              <MyName languageCode="EN">MyName</MyName>
              <MyBillToParty schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeAgencySchemeID="token" schemeID="token">token</MyBillToParty>
              <MyDateToBeDelivered>2001-01-01</MyDateToBeDelivered>
              <MyEmployeeResponsible schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeAgencySchemeID="token" schemeID="token">token</MyEmployeeResponsible>
              <MySalesUnit schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeAgencySchemeID="token" schemeID="token">token</MySalesUnit>
                <MyItem>
                    <MyItemID>token</MyItemID>
                    <MyItemProductID schemeAgencyID="token" schemeID="token">token</MyItemProductID>
                    <MyItemDescription languageCode="EN">MyItemDescription</MyItemDescription>
                    <MyProductTypeCode>token</MyProductTypeCode>
                    <MyRequestedQuantity unitCode="token">0.0</MyRequestedQuantity>
                    <MyConfirmedQuantity unitCode="token">0.0</MyConfirmedQuantity>
                    <MyNetAmount currencyCode="token">0.0</MyNetAmount>
                </MyItem>
            </MySalesOrderUploaded>
        </List>
    </p:MySalesOrderUploadedIntegrationInputRequest>
    Thank you all for your attention.
    Best regards.
    Jacques-Antoine Ollier

    Hello Jacques-Antoine,
    I suppose that as you have tried to construct a map from the schema, you have taken the elements from the List level down. In this case I also can't export the map.
    But if you take the elements from the level MySalesOrderUploaded down, you'll get the exportable map (screenshots)
    Best regards,
    Leonid Granatstein

  • Cant read a part of  xml file using AS3

    Hi
    i can read everything from my xml file except a part that i can always get teh first items of each category (it will make more sence in a sec)
    So here is my xml
    [HTML]<?xml version="1.0" encoding="UTF-8"?>
    <flashxml>
      <second_page>
        <sp text="ss ptextj"/>
        <ss text="sptext"/>
        <clas text="clas"/>
      </second_page>
      <third_page>
        <ss>
          <category name="categor">
            <item>3333</item>
            <item>H4444</item>
            <item>etc etc etc </item>
          </category>
          <category name="security ">
            <item>SSL</item>
            <item>Hacke</item>
            <item>etc etc etc </item>
          </category>
        </ss>
        <sp>
          <category name="security a">
            <item>SSL lallalala</item>
            <item>Hacker</item>
            <item>etc etc etc </item>
          </category>
          <category name="onlin">
            <item>Hussle free</item>
            <item>Diafore</item>
            <item>etc etc 2 </item>
          </category>
        </sp>
        <classifieds>
          <category name="Best">
            <item>Additem1</item>
            <item>Additem2</item>
            <item>Additem3 </item>
          </category>
        </classifieds>
      </third_page>
    </flashxml>[/HTML]
    I am trying for each category in the xml to get the relevant items ...
    The problem is that if i try to read for e.g the second set of items for the second category of <sp> using a counter it throws a type error
    TypeError: Error #1010: A term is undefined and has no properties.
    at MethodInfo-1()
    at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/flash.net:URLLoader::onComplete()
    so the following works
    var itemslist:XMLList = xml.third_page.ss.category[0].item;  (it will always display the first items of the first category for all the categories
    so for instance for sp will always return even for the second category
    <item>SSL lallalala</item>
            <item>Hacker</item>
            <item>etc etc etc </item>
    but when i am using
    var itemslist:XMLList = xml.third_page.ss.category[i].item;
    i am getting the type error above TypeError: Error #1010 .. (no idea why)
    Any help will be much appreciated
    complete code ::
    pp.buttonMode = true;
    pp.addEventListener(MouseEvent.ROLL_OVER, onButtonOver);
    pp.addEventListener(MouseEvent.CLICK, onButtonOut);
    function onButtonOver(e:MouseEvent):void
    e.currentTarget.gotoAndPlay("a");
    var xmlString:URLRequest = new URLRequest("ev.xml");
    var xmlLoader:URLLoader = new URLLoader(xmlString);
    xmlLoader.addEventListener("complete", init);
    function init(event:Event):void{
      var xDoc:XMLDocument = new XMLDocument();
      xDoc.ignoreWhite = true;
      var animalsXML:XML = XML(xmlLoader.data);
       //var list:XML = XML(xml Loader.data);
    // trace (animalsXML);  //prints the xml
      //edooooooooooooooooooooooooooooooooooo
    var  xml = XML(xmlLoader.data); 
               trace ("XML File");  
           trace ("===================");  
               trace (xml.second_page.sp.attribute("text"));   
          trace (xml.second_page.ss.attribute("text"));   
          trace (xml.second_page.clas.attribute("text"));   
      //edoooooooooooooooooooooooooooooooooooooooooooooooooooo
    // Third page ss
       var i = 0;
       var categorylist:XMLList = xml.third_page.ss.category;  
              for each (var captionElement:XML in categorylist)  
         i++;
                   trace (captionElement.attribute("name")); 
        //trace (captionElement.item);
        var itemslist:XMLList = xml.third_page.ss.category[0].item;
        for each (var captionElement:XML in itemslist)  
                    trace(captionElement);
      // trace (valueOf(captionElement.item));
    // Third page sp
       var i = 0;
       var categorylist:XMLList = xml.third_page.sp.category;  
              for each (var captionElement:XML in categorylist)  
         i++;
                   trace (captionElement.attribute("name")); 
        //trace (captionElement.item);
        var itemslist:XMLList = xml.third_page.sp.category[0].item;
        for each (var captionElement:XML in itemslist)  
                    trace(captionElement);
      // trace (valueOf(captionElement.item));
    // Third page clas
      var i = 0;
       var categorylist:XMLList = xml.third_page.classifieds.category;  
              for each (var captionElement:XML in categorylist)  
    i++;
               trace (i);
         trace (captionElement.attribute("name"));
        //   trace (captionElement.item);
      // trace (valueOf(captionElement.item));
        //var hi= captionElement.attribute("name");
    var itemslist:XMLList = xml.third_page.classifieds.category[0].item;
        for each (var captionElement:XML in itemslist)  
                    trace(captionElement);
      // trace (valueOf(captionElement.item));
      for each(var itemData:XML in animalsXML.elements()) {
    //  trace(itemData.elements().attribute("text")); //DOULEUI
    //third page
    //itemData.thirdpage.elements()[0].@patty
      xDoc.parseXML(animalsXML.toXMLString());
    // trace(xDoc.firstChild.childNodes[0]); //Riverside
      //trace(xDoc.firstChild.childNodes[0].nodeValue);
    //trace(xDoc.valueOf(.getElementsByTagName("item")[0].childNodes[0].nodeValue);
    function onButtonOut(e:MouseEvent):void
    e.currentTarget.gotoAndPlay("b");
    pb.gotoAndPlay("a");

    use
    var itemslist:XMLList = captionElement.item;
    instead of
    var itemslist:XMLList = xml.third_page.sp.category[0].item;
    that should work. You already got the category node in your captionElement variable, why not just use it instead of looking it up again in the document tree?

  • How to read the complete path in file upload UI

    Hi,
    I want to know how to read the complete path in file upload UI in java web dynpro.
    I have created 1 file upload UI and than when i do browse and select some file say small.jpg from my local PC, desktop , its path is coming in file upload UI like E:\small.jpg,
    I want to know how to get this path in java webdynpro code.
    please let me know..

    Hi Satyam,
    In webdynpro java, first file stores in server location then it reads from server.
    Create a button with upload and write this code OnAction
    Resource is the attribute name in context of type com.sap.ide.webdynpro.uielementdefinitions.Resource, this attribute is for Resource property for Upload UI Element.
    Then in OnAction of button
    InputStream text = null;
           int temp=0;
           try{
                File file = new File(wdContext.currentContextElement().getResource().getResourceName().toString());
               String path = file.getAbsolutePath();
                wdComponentAPI.getMessageManager().reportSuccess(path);
           }catch(Exception e){
                e.printStackTrace();
        //@@end
    Regards,
    Pradeep
    Edited by: pradeep_546 on May 11, 2011 12:22 PM

  • How to read MG1, MGU, SG1, SGU files?

    I have copies of Band in a Box and Aebersold music software, from an older PC.
    How to read MG1, MGU, SG1, SGU files on my MacBook Air?
    Many thanks, Antoine

    I believe in Linux/Unix, everything is treated as a file descriptor, be it a disk, socket, hardware device or an actual file. Since Java will simply call the appropriate method (length() for example) on the descriptor, I would imagine it would be up to the operating system to determine what to return. If I ask for the length() of a socket, I'm not sure what it would return. The bytes not flushed in the buffer? Total transmitted? Some random uid? I'm sure it is defined somewhere but the behavior may not be what you expect. See if you can use a 'vanilla' command-line method to get the file length from that device. If it too returns zero, you know it's not your program.
    - Saish

Maybe you are looking for

  • [SOLVED] Help, can't get my X-Fi to work :(

    Hi all.  I recently decided to try out Arch.  I'm currently running Gentoo on my boxes, but I set up arch on a new drive and I'm giving it a go.  However, the time I have saved by not having to compile anything or troubleshoot emerge issues has now b

  • Query - Inventory Value

    Hi all, Gordon gave me the below query yesterday for getting stock value at a given date. SELECT T0.Warehouse, T0.StockAct, T0.TransValue, T0.CostAct,T0.Cogsval from oinm T0 WHERE T0.DocDate <= '%0' The query gives out the correct Total value for all

  • SolMan and Dev client

    Hello! We are in the configuration phase now using SM4.0. Our  SolMan-Prod is connected to the Dev client (Golden client) as target. The team is configuring using solar02 and accessing the IMG and completing the configuration document. Some team memb

  • Missing scroll bar

    The horizontal scroll bar is missing. I am running O)SX 10.5 with Safari 10.6. Any ideas how to fix this?

  • Printing to Canon iP4000 after 10.3 - 10.4 upgrade works

    I got a new Canon PIXMA iP4000 printer and connected it to my Airport Extreme Base Station. I downloaded and installed the 2.6.2 drivers from Canon's site on my iMac (upgrades from 10.3 to 10.4). When I tried to add the printer, using the Printer Set