Reading problem in xml

Hello Guys,
I am facing one problem to reading an xml file. the following is my xml file.
<flight id="0gy09tfj2ydb4001" direction="outbound">
     <segment is_eticketable="0">
          <airline>BA</airline>
          <equipment></equipment>
          <flight_number>188</flight_number>
          <departure>EWR</departure>
          <arrival>LHR</arrival>
          <class>B</class>
          <date>2006-07-27</date>
          <departure_time>21:20:00</departure_time>
          <arrival_time next_day="1">09:15:00</arrival_time>
          <gds>gal-xmlVDR1</gds>                         
     </segment>
     <segment is_eticketable="0">
          <airline>BA</airline>
          <equipment></equipment>
          <flight_number>139</flight_number>
          <departure>LHR</departure>
          <arrival>BOM</arrival>
          <class>R</class>
          <date>2006-07-28</date>
          <departure_time>11:05:00</departure_time>
          <arrival_time next_day="1">00:15:00</arrival_time>
          <gds>gal-xmlVDR1</gds>                         
     </segment>
</flight>
<flight id="0gy09tfj2ydb4002" direction="inbound">
     <segment is_eticketable="0">
          <airline>BA</airline>
          <equipment></equipment>
          <flight_number>138</flight_number>
          <departure>BOM</departure>
          <arrival>LHR</arrival>
          <class>R</class>
          <date>2006-08-20</date>
          <departure_time>02:15:00</departure_time>
          <arrival_time next_day="0">07:35:00</arrival_time>
          <gds>gal-xmlVDR1</gds>                         
     </segment>
     <segment is_eticketable="0">
          <airline>BA</airline>
          <equipment></equipment>
          <flight_number>117</flight_number>
          <departure>LHR</departure>
          <arrival>JFK</arrival>
          <class>B</class>
          <date>2006-08-20</date>
          <departure_time>08:55:00</departure_time>
          <arrival_time next_day="0">11:15:00</arrival_time>
          <gds>gal-xmlVDR1</gds>                         
     </segment>
</flight>
<flight id="0gy09tfj2ydb4003" direction="inbound">
     <segment is_eticketable="0">
          <airline>BA</airline>
          <equipment></equipment>
          <flight_number>198</flight_number>
          <departure>BOM</departure>
          <arrival>LHR</arrival>
          <class>R</class>
          <date>2006-08-20</date>
          <departure_time>12:55:00</departure_time>
          <arrival_time next_day="0">18:10:00</arrival_time>
          <gds>gal-xmlVDR1</gds>                         
     </segment>
     <segment is_eticketable="0">
          <airline>BA</airline>
          <equipment></equipment>
          <flight_number>183</flight_number>
          <departure>LHR</departure>
          <arrival>JFK</arrival>
          <class>B</class>
          <date>2006-08-20</date>
          <departure_time>20:00:00</departure_time>
          <arrival_time next_day="0">22:30:00</arrival_time>
          <gds>gal-xmlVDR1</gds>                         
     </segment>
</flight>
In this xml every flight tag there is two segment tag. i want to read segment tag for each flight tag individual.
send me a code for this xml read.
Waiting for your reply as soon as possible,
Regards,
Bhavesh Kharwa

You don't have a problem, you just don't want to do the work yourself. Go figure out how to do this (a google search on "java xml parsing" would be a good place to start) and then when you really have a problem post the code and we'll help you to fix it.

Similar Messages

  • Problems to read out an XML

    Hello together
    I have a problem to read out an XML file with JDOM. I am in charge to read out one attribute of the XML with JDOM. But my XML file has more than one Attribute of the same type. It is repeated more than once... It looks like that...
    <Resolution v="PT15M"/>
                   <Interval>
                        <Pos v="1"/>
                        <Qty v="0"/>
                   </Interval>
                   <Interval>
                        <Pos v="2"/>
                        <Qty v="0"/>
                   </Interval>
                   <Interval>
                        <Pos v="3"/>
                        <Qty v="0.379"/>
                   </Interval>
                   <Interval>
                        <Pos v="4"/>
                        <Qty v="2.453"/>
                   </Interval>
                   <Interval>
                        <Pos v="5"/>
                        <Qty v="0"/>
                   </Interval>
                   <Interval>
                        <Pos v="6"/>
                        <Qty v="0"/>
                   </Interval>
                   <Interval>
                        <Pos v="7"/>
                        <Qty v="1.108"/>
                   </Interval>
                   <Interval>
                        <Pos v="8"/>
                        <Qty v="2.22"/>
                   </Interval>
                   <Interval>
                        <Pos v="9"/>
                        <Qty v="0"/>
                   </Interval>
                   <Interval>
                        <Pos v="10"/>
                        <Qty v="0.247"/>
                   </Interval>
                   <Interval>
                        <Pos v="11"/>
                        <Qty v="0.712"/>
                   </Interval>
                   <Interval>
                        <Pos v="12"/>
                        <Qty v="0.964"/>
                   </Interval>
    Now, I want to read out the Qty from 1 to 6 and I tried it now with an Iterator but it doesn't work...I don't know what the problem is, so please help me...
    I also post the Java File here. I am sorry for y English..
    package FahrplanXML;
    import java.io.File;
    import java.io.IOException;
    import java.util.Iterator;
    import org.jdom.Attribute;
    import org.jdom.Document;
    import org.jdom.Element;
    import org.jdom.JDOMException;
    import org.jdom.input.SAXBuilder;
    public class Saxwer {
         //Variablendeklaration
         private File inFile;
         //Konstruktor
         public Saxwer(File in) {
              this.inFile = in;     
         //Weitergabe der Variablen durch return vorbereiten
         //public String getDtdVersion() {
              //System.out.println (scheduleDtdVersion);
              //return scheduleDtdVersion;     
         public void saxwer() throws JDOMException, IOException {
              //FileAuswahl filename = new FileAuswahl();
                   System.out.println(inFile);
                   SAXBuilder builder = new SAXBuilder();
                   Document doc = builder.build(inFile);
                   /*Elemente holen*/
                   //1.Stufe
                   //Root Element auslesen
                   Element schedulemessage = doc.getRootElement();
                   //2. Stufe
                   //Childs von Root Element auslesen
                   Element messageidentification = schedulemessage.getChild("MessageIdentification");
                   Element messageversion = schedulemessage.getChild("MessageVersion");
                   Element messagetype = schedulemessage.getChild("MessageType");
                   Element processtype = schedulemessage.getChild("ProcessType");
                   Element scheduleclassificationtype = schedulemessage.getChild("ScheduleClassificationType");
                   Element senderidentification = schedulemessage.getChild("SenderIdentification");
                   Element senderrole = schedulemessage.getChild("SenderRole");
                   Element receiveridentification = schedulemessage.getChild("ReceiverIdentification");
                   Element receiverrole = schedulemessage.getChild("ReceiverRole");
                   Element messagedatetime = schedulemessage.getChild("MessageDateTime");
                   Element scheduletimeinterval  = schedulemessage.getChild("ScheduleTimeInterval");
                   Element scheduletimeseries  = schedulemessage.getChild("ScheduleTimeSeries");
                   //3. Stufe
                   // Childs von scheduletimeseries auslesen
                   Element senderstimeseriesidentification = scheduletimeseries.getChild("SendersTimeSeriesIdentification");
                   Element senderstimeseriesversion = scheduletimeseries.getChild("SendersTimeSeriesVersion");
                   Element businesstype = scheduletimeseries.getChild("BusinessType");
                   Element product = scheduletimeseries.getChild("Product");
                   Element objectaggregation = scheduletimeseries.getChild("ObjectAggregation");
                   Element outarea = scheduletimeseries.getChild("OutArea");
                   Element outparty = scheduletimeseries.getChild("OutParty");
                   Element measurementunit = scheduletimeseries.getChild("MeasurementUnit");
                   Element period = scheduletimeseries.getChild("Period");
                   //4. Stufe
                   // Childs von period auslesen
                   Element timeinterval = period.getChild("TimeInterval");
                   Element resolution = period.getChild("Resolution");
                   Element interval = period.getChild("Interval");
                   //5. Stufe
                   // Childs von interval auslesen
                   Element position = interval.getChild("Pos");
                   Element quantity = interval.getChild("Qty");
                   /*Attribute holen*/
                   //Attribute von Root Element (Stufe 1) auslesen (aus XML)
                   String scheduleDtdVersion = schedulemessage.getAttributeValue ("DtdVersion"); 
                   String scheduleDtdRelease = schedulemessage.getAttributeValue ("DtdRelease");
                   //Attribute aus Stufe 2 auslesen (aus XML)
                   String messageidentificationv = messageidentification.getAttributeValue ("v");
                   String messageversionv = messageversion.getAttributeValue ("v");
                   String messagetypev = messagetype.getAttributeValue ("v");
                   String processtypev = processtype.getAttributeValue ("v");
                   String scheduleclassificationtypev = scheduleclassificationtype.getAttributeValue ("v");
                   String senderidentificationv = senderidentification.getAttributeValue ("v");
                   String senderidentificationcodingscheme = senderidentification.getAttributeValue ("codingScheme");
                   String senderrolev = senderrole.getAttributeValue ("v");
                   String receiveridentificationv = receiveridentification.getAttributeValue ("v");
                   String receiveridentificationcodingscheme = receiveridentification.getAttributeValue ("codingScheme");
                   String receiverrolev = receiverrole.getAttributeValue ("v");
                   String messagedatetimev = messagedatetime.getAttributeValue ("v");
                   String scheduletimeintervalv = scheduletimeinterval.getAttributeValue ("v");
                   //Attribute aus Stufe 3 auslesen (aus XML)
                   String senderstimeseriesidentificationv = senderstimeseriesidentification.getAttributeValue ("v");
                   String senderstimeseriesversionv = senderstimeseriesversion.getAttributeValue ("v");
                   String businesstypev = businesstype.getAttributeValue ("v");
                   String productv = product.getAttributeValue ("v");
                   String objectaggregationv = objectaggregation.getAttributeValue ("v");
                   String outareav = outarea.getAttributeValue ("v");
                   String outareacodingscheme = outarea.getAttributeValue ("v");
                   String outpartyv = outparty.getAttributeValue ("v");
                   String outpartycodingscheme = outparty.getAttributeValue ("v");
                   String measurementunitv = measurementunit.getAttributeValue ("v");
                   //Attribute aus Stufe 4 auslesen (aus XML)
                   String timeintervalv = timeinterval.getAttributeValue ("v");
                   String resolutionv = resolution.getAttributeValue ("v");
                   //Attribute aus Stufe 5 auslesen (aus XML)
                   Iterator i = period.getChildren("Interval").iterator();
                   while(i.hasNext()) {
                     Element currentElement = (Element)i.next();
                     Iterator j = currentElement.getAttributes().iterator();
                     System.out.print(j);
                     while(j.hasNext()) {
                          Attribute currentAttribute = (Attribute)j.next();
                       System.out.println("Attribute\t Name: "+currentAttribute.getName()+", Value: "+currentAttribute.getValue());
                   String positionv = position.getAttributeValue ("v");
                   String quantityv = quantity.getAttributeValue ("v");
                   Detailoberflaeche xmluebergabe = new Detailoberflaeche(scheduleDtdVersion, scheduleDtdRelease, messageidentificationv, messageversionv, messagetypev, processtypev, scheduleclassificationtypev, senderidentificationv, senderidentificationcodingscheme, senderrolev, receiveridentificationv, receiveridentificationcodingscheme, receiverrolev, messagedatetimev, scheduletimeintervalv, senderstimeseriesidentificationv, senderstimeseriesversionv, businesstypev, productv, objectaggregationv, outareav, outareacodingscheme, outpartyv, outpartycodingscheme, measurementunitv, timeintervalv, resolutionv, positionv, quantityv);
                   xmluebergabe.grundoberflaechen();
    }Thank you for your help....
    Kind regards
    Roger

    Hello together
    I have a problem to read out an XML file with JDOM. I am in charge to read out one attribute of the XML with JDOM. But my XML file has more than one Attribute of the same type. It is repeated more than once... It looks like that...
    <Resolution v="PT15M"/>
    <Interval>
    <Pos v="1"/>
    <Qty v="0"/>
    </Interval>
    <Interval>
    <Pos v="2"/>
    <Qty v="0"/>
    </Interval>
    <Interval>
    <Pos v="3"/>
    <Qty v="0.379"/>
    </Interval>
    <Interval>
    <Pos v="4"/>
    <Qty v="2.453"/>
    </Interval>
    <Interval>
    <Pos v="5"/>
    <Qty v="0"/>
    </Interval>
    <Interval>
    <Pos v="6"/>
    <Qty v="0"/>
    </Interval>
    <Interval>
    <Pos v="7"/>
    <Qty v="1.108"/>
    </Interval>
    <Interval>
    <Pos v="8"/>
    <Qty v="2.22"/>
    </Interval>
    <Interval>
    <Pos v="9"/>
    <Qty v="0"/>
    </Interval>
    <Interval>
    <Pos v="10"/>
    <Qty v="0.247"/>
    </Interval>
    <Interval>
    <Pos v="11"/>
    <Qty v="0.712"/>
    </Interval>
    <Interval>
    <Pos v="12"/>
    <Qty v="0.964"/>
    </Interval>
    Now, I want to read out the Qty from 1 to 6 and I tried it now with an Iterator but it doesn't work...I don't know what the problem is, so please help me...
    The problem is, that the Iterator doesn't bring out my Quantity Attribute (see part of the xml above). I didn't get any error messages, so I really don't know what the problem is. I am a beginner, so maybe you can help me...
    I also post the Java File here. I am sorry for my English..
                   /*Elemente holen*/
                   //4. Stufe
                   // Childs von period auslesen
                   Element timeinterval = period.getChild("TimeInterval");
                   Element resolution = period.getChild("Resolution");
                   Element interval = period.getChild("Interval");
                   //5. Stufe
                   // Childs von interval auslesen
                   Element position = interval.getChild("Pos");
                   Element quantity = interval.getChild("Qty");
                   /*Attribute holen*/
                   //Attribute aus Stufe 4 auslesen (aus XML)
                   String timeintervalv = timeinterval.getAttributeValue ("v");
                   String resolutionv = resolution.getAttributeValue ("v");
                   //Attribute aus Stufe 5 auslesen (aus XML)
                   Iterator i = period.getChildren("Interval").iterator();
                   while(i.hasNext()) {
                   Element currentElement = (Element)i.next();
                   Iterator j = currentElement.getAttributes().iterator();
                   System.out.print(j);
                   while(j.hasNext()) {
                        Attribute currentAttribute = (Attribute)j.next();
                   System.out.println("Attribute\t Name: "+currentAttribute.getName()+", Value: "+currentAttribute.getValue());
                   String positionv = position.getAttributeValue ("v");
                   String quantityv = quantity.getAttributeValue ("v");
    Thank you for your help....
    Kind regards
    Roger
    Message was edited by:
    superb
    Message was edited by:
    superb

  • Problem with XML on Linux

    hi everybody,
    I've a big problem with XML on Linux, in details I see my program stopping on Linux at the instruction
    XMLReader xr = XMLReaderFactory.createXMLReader("org.apache.crimson.parser.XMLReaderImpl");
    and it's strange because on Windows it runs and there aren't problems about permissions on files, does anyone knows what to do?
    thanks in advance!
    Stefano

    What happens on that line? I'm assuming you get some kind of error or exception.
    Make sure the JAR file for Crimson is in your classpath.

  • LPX-00601: Invalid token in: err while trying to read data from xml

    Hey ,
    While trying to read data from xml i got err:
    LPX-00601: Invalid token in: 'path'
    the proc. i'm using to read data from the xml is:
    procedure read_xml_file_test (in_filename in varchar2)
    is
    my_dir  varchar2(20) := 'XML_DIR;
      cur_emp2 number:=0;
      l_bfile   BFILE;
      l_clob    CLOB;
      l_parser  dbms_xmlparser.Parser;
      l_doc     dbms_xmldom.DOMDocument;
      l_nl      dbms_xmldom.DOMNodeList;
      l_nl2    dbms_xmldom.DOMNodeList;
      l_n       dbms_xmldom.DOMNode; 
      l_n2     dbms_xmldom.DOMNode;
      l_temp    VARCHAR2(1000);
    v_errors        internet_clients.errors%type; 
    src_csid       NUMBER := NLS_CHARSET_ID('UTF8'); 
    dest_offset    INTEGER := 1;
    src_offset     INTEGER := 1;
    lang_context   INTEGER := dbms_lob.default_lang_ctx;
    warning        INTEGER;
    v_count       number := 0;   --total records
    v_count_s      number := 0;   -- sucsess record
    v_count_f      number := 0;   -- failed record
    v_flag varchar2(1);
    v_char2 varchar2(1);
    v_l1 VARCHAR2(255);
    v_l2 VARCHAR2(255);
    v_l3 VARCHAR2(255);
    v_l4 VARCHAR2(255);
    v_l6 VARCHAR2(255);
    BEGIN
      l_bfile := BFileName(my_dir, in_filename);
      dbms_lob.createtemporary(l_clob, cache=>FALSE);
      dbms_lob.open(l_bfile, dbms_lob.lob_readonly);
      dbms_lob.loadclobfromfile(l_clob, l_bfile, dbms_lob.getlength(l_bfile), dest_offset,src_offset, src_csid, lang_context, warning);                        
      dbms_lob.close(l_bfile);
      -- make sure implicit date conversions are performed correctly
      dbms_session.set_nls('NLS_DATE_FORMAT','''DD/MM/RR HH24:MI:SS''');   
      -- Create a parser.
      l_parser := dbms_xmlparser.newParser;
      -- Parse the document and create a new DOM document.
        dbms_xmlparser.parseClob(l_parser, l_clob);
        l_doc := dbms_xmlparser.getDocument(l_parser);
      -- Free resources associated with the CLOB and Parser now they are no longer needed.
      dbms_lob.freetemporary(l_clob);
      dbms_xmlparser.freeParser(l_parser);  
      -- Get a list of all the  nodes in the document using the XPATH syntax.
      l_nl := dbms_xslprocessor.selectNodes(dbms_xmldom.makeNode(l_doc),'soap:Envelope/soap:Body/GetFieldsNameResponse/GetFieldsNameResult/diffgr:diffgram/DataSet_FRM_GANERIC_PROP/FRM_GANERIC_PROP');
      -- Loop through the list and create a new record in a tble collection
      -- for each  record.
      FOR cur_emp IN 0 .. dbms_xmldom.getLength(l_nl) - 1 LOOP
       l_n := dbms_xmldom.item(l_nl, cur_emp);
       cur_emp2:=0;
       loop
         v_count := v_count + 1;
         begin
        -- Use XPATH syntax to assign values to he elements of the collection.
        dbms_xslprocessor.valueOf(l_n,'L1/text()',v_l1);
        dbms_xslprocessor.valueOf(l_n,'L2/text()',v_l2);
        dbms_xslprocessor.valueOf(l_n,'L3/text()',v_l3);
        dbms_xslprocessor.valueOf(l_n,'L4/text()',v_l4);
        dbms_xslprocessor.valueOf(l_n,'L6/text()',v_l6);
            exception
      when others then 
      null;
      end;
    exit when cur_emp2=dbms_xmldom.getLength(l_nl2);
      END LOOP;
      end loop;
      -- Free any resources associated with the document now it
      -- is no longer needed.
      dbms_xmldom.freeDocument(l_doc);
      --remove file to another directory   
          --COMMIT;  -- do not use the commit if you want to run this proc. from within the search_dir_list proc , because it execute a select from tmp table dir_list which contain a "on commit delete rows"  clause.    
      /*EXCEPTION
      /*WHEN OTHERS THEN
       dbms_lob.freetemporary(l_clob);
        dbms_xmlparser.freeParser(l_parser);
       dbms_xmldom.freeDocument(l_doc);
        null;
        ROLLBACK; */
    END;While trying to execute this i got:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00601: Invalid token in: 'soap:Envelope/soap:Body/GetFieldsNameResponse/GetFieldsNameResult/diffgr:diffgram/DataSet_FRM_GANERIC_PROP/FRM_GANERIC_PROP'
    ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 939
    ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 967
    ORA-06512: at "MARKET.READ_XML_FILE_TEST", line 51
    ORA-06512: at line 1
    i guess i mised somthing at the line
    l_nl := dbms_xslprocessor.selectNodes(dbms_xmldom.makeNode(l_doc),'soap:Envelope/soap:Body/GetFieldsNameResponse/GetFieldsNameResult/diffgr:diffgram/DataSet_FRM_GANERIC_PROP/FRM_GANERIC_PROP');i attached here part of my xml:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    - <soap:Body>
    - <GetFieldsNameResponse xmlns="http://tempuri.org/">
    - <GetFieldsNameResult>
    - <xs:schema id="DataSet_FRM_GANERIC_PROP" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    - <xs:element name="DataSet_FRM_GANERIC_PROP" msdata:IsDataSet="true" msdata:Locale="he-IL">
    - <xs:complexType>
    - <xs:choice minOccurs="0" maxOccurs="unbounded">
    - <xs:element name="FRM_GANERIC_PROP">
    - <xs:complexType>
    - <xs:sequence>
      </xs:sequence>
      </xs:complexType>
      </xs:element>
      </xs:choice>
      </xs:complexType>
      </xs:element>
      </xs:schema>
    - <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
    - <DataSet_FRM_GANERIC_PROP xmlns="">
    - <FRM_GANERIC_PROP diffgr:id="FRM_GANERIC_PROP1" msdata:rowOrder="0">
      <L1>val1</L1>
      <L2>val2</L2>
      <L3>val3</L3>
      <L4>val4</L4>
      <L6>val6</L6>
      </FRM_GANERIC_PROP>
      </DataSet_FRM_GANERIC_PROP>
      </diffgr:diffgram>
      </GetFieldsNameResult>
      </GetFieldsNameResponse>
      </soap:Body>
      </soap:Envelope>I Guess it somthing that have to do with node definition ,
    but i have tried so many combinations and none ot those worked for me.
    i'm deeply stuck here.
    What do i miss here?
    THANKS yair
    Edited by: yair_k on 02:30 14/10/2010

    Hey , after got a lot of success with the xml reading part , i wonder if you
    can help me with a problem while trying to reading that xml from a web service.
    i use a procedure as followes:
    FUNCTION read_from_web_service(in_username in varchar2 , in_password in varchar2)
      RETURN CHAR
    AS
      l_service          UTL_DBWS.service;
      l_call             UTL_DBWS.call;
      l_a_ns                     VARCHAR2(32767);
      l_wsdl_url         VARCHAR2(32767);
      l_namespace        VARCHAR2(32767);
      l_service_qname    UTL_DBWS.qname;
      l_port_qname       UTL_DBWS.qname;
      l_operation_qname  UTL_DBWS.qname;
      l_xmltype_in       SYS.XMLTYPE;
      l_xmltype_out      SYS.XMLTYPE;
      l_return           VARCHAR2(32767);
    BEGIN
      l_wsdl_url        := 'http://www.company.com/publisherService/ServiceGetpublisherTable.asmx?wsdl';
      l_namespace       := 'http://tempuri.org/';
      l_service_qname   := UTL_DBWS.to_qname(l_namespace, 'ServiceGetpublisherTable');
      l_port_qname      := UTL_DBWS.to_qname(l_namespace, 'ServiceGetpublisherTableSoap');
      l_operation_qname := UTL_DBWS.to_qname(l_namespace, 'GetFieldsName');
      l_service := UTL_DBWS.create_service (
        wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),
        service_name           => l_service_qname);
      l_call := UTL_DBWS.create_call (
        service_handle => l_service,
        port_name      => l_port_qname,
        operation_name => l_operation_qname);
      l_xmltype_in := SYS.XMLTYPE('<?xml version="1.0" encoding="utf-8"?>
        <GetFieldsName xmlns="' || l_namespace || '">
        <user>' || in_username || '</user>
        <password>'|| in_password || '</password>
        </GetFieldsName>');
      l_xmltype_out := UTL_DBWS.invoke(call_Handle => l_call,
                                       request     => l_xmltype_in);
      UTL_DBWS.release_call (call_handle => l_call);
      UTL_DBWS.release_service (service_handle => l_service);
      l_return := l_xmltype_out.extract('//GetFieldsName/text()').getstringVal();
       dbms_output.put_line(l_return);     
      RETURN l_return;
    END;but when i run it i got message:
    ORA-29532: Java call terminated by uncaught Java exception: javax.xml.rpc.soap.SOAPFaultException: Server did not recognize the value of HTTP Header SOAPAction: .
    regarding the line:
    l_xmltype_out := UTL_DBWS.invoke(call_Handle => l_call,
    request => l_xmltype_in);
    So , i deeply stuck here!
    my web service description is:
      <?xml version="1.0" encoding="utf-8" ?>
    - <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    - <wsdl:types>
    - <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
    - <s:element name="GetFieldsName">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="user" type="s:string" />
      <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="GetFieldsNameResponse">
    - <s:complexType>
    - <s:sequence>
    - <s:element minOccurs="0" maxOccurs="1" name="GetFieldsNameResult">
    - <s:complexType>
    - <s:sequence>
      <s:element ref="s:schema" />
      <s:any />
      </s:sequence>
      </s:complexType>
      </s:element>
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="GetMSG_ByUser_Not_Readed">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="user" type="s:string" />
      <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="GetMSG_ByUser_Not_ReadedResponse">
    - <s:complexType>
    - <s:sequence>
    - <s:element minOccurs="0" maxOccurs="1" name="GetMSG_ByUser_Not_ReadedResult">
    - <s:complexType>
    - <s:sequence>
      <s:element ref="s:schema" />
      <s:any />
      </s:sequence>
      </s:complexType>
      </s:element>
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="SetMSG_ByUser_Not_Readed_As_Readed">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="user" type="s:string" />
      <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
      <s:element minOccurs="0" maxOccurs="1" name="Rec_Id" type="s:string" />
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="SetMSG_ByUser_Not_Readed_As_ReadedResponse">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="SetMSG_ByUser_Not_Readed_As_ReadedResult" type="s:boolean" />
      </s:sequence>
      </s:complexType>
      </s:element>
      </s:schema>
      </wsdl:types>
    - <wsdl:message name="GetFieldsNameSoapIn">
      <wsdl:part name="parameters" element="tns:GetFieldsName" />
      </wsdl:message>
    - <wsdl:message name="GetFieldsNameSoapOut">
      <wsdl:part name="parameters" element="tns:GetFieldsNameResponse" />
      </wsdl:message>
    - <wsdl:message name="GetMSG_ByUser_Not_ReadedSoapIn">
      <wsdl:part name="parameters" element="tns:GetMSG_ByUser_Not_Readed" />
      </wsdl:message>
    - <wsdl:message name="GetMSG_ByUser_Not_ReadedSoapOut">
      <wsdl:part name="parameters" element="tns:GetMSG_ByUser_Not_ReadedResponse" />
      </wsdl:message>
    - <wsdl:message name="SetMSG_ByUser_Not_Readed_As_ReadedSoapIn">
      <wsdl:part name="parameters" element="tns:SetMSG_ByUser_Not_Readed_As_Readed" />
      </wsdl:message>
    - <wsdl:message name="SetMSG_ByUser_Not_Readed_As_ReadedSoapOut">
      <wsdl:part name="parameters" element="tns:SetMSG_ByUser_Not_Readed_As_ReadedResponse" />
      </wsdl:message>
    - <wsdl:portType name="ServiceGetpublisherTableSoap">
    - <wsdl:operation name="GetFieldsName">
      <wsdl:input message="tns:GetFieldsNameSoapIn" />
      <wsdl:output message="tns:GetFieldsNameSoapOut" />
      </wsdl:operation>
    - <wsdl:operation name="GetMSG_ByUser_Not_Readed">
      <wsdl:input message="tns:GetMSG_ByUser_Not_ReadedSoapIn" />
      <wsdl:output message="tns:GetMSG_ByUser_Not_ReadedSoapOut" />
      </wsdl:operation>
    - <wsdl:operation name="SetMSG_ByUser_Not_Readed_As_Readed">
      <wsdl:input message="tns:SetMSG_ByUser_Not_Readed_As_ReadedSoapIn" />
      <wsdl:output message="tns:SetMSG_ByUser_Not_Readed_As_ReadedSoapOut" />
      </wsdl:operation>
      </wsdl:portType>
    - <wsdl:binding name="ServiceGetpublisherTableSoap" type="tns:ServiceGetpublisherTableSoap">
      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    - <wsdl:operation name="GetFieldsName">
      <soap:operation soapAction="http://tempuri.org/GetFieldsName" style="document" />
    - <wsdl:input>
      <soap:body use="literal" />
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="GetMSG_ByUser_Not_Readed">
      <soap:operation soapAction="http://tempuri.org/GetMSG_ByUser_Not_Readed" style="document" />
    - <wsdl:input>
      <soap:body use="literal" />
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="SetMSG_ByUser_Not_Readed_As_Readed">
      <soap:operation soapAction="http://tempuri.org/SetMSG_ByUser_Not_Readed_As_Readed" style="document" />
    - <wsdl:input>
      <soap:body use="literal" />
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
    - <wsdl:binding name="ServiceGetpublisherTableSoap12" type="tns:ServiceGetpublisherTableSoap">
      <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    - <wsdl:operation name="GetFieldsName">
      <soap12:operation soapAction="http://tempuri.org/GetFieldsName" style="document" />
    - <wsdl:input>
      <soap12:body use="literal" />
      </wsdl:input>
    - <wsdl:output>
      <soap12:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="GetMSG_ByUser_Not_Readed">
      <soap12:operation soapAction="http://tempuri.org/GetMSG_ByUser_Not_Readed" style="document" />
    - <wsdl:input>
      <soap12:body use="literal" />
      </wsdl:input>
    - <wsdl:output>
      <soap12:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="SetMSG_ByUser_Not_Readed_As_Readed">
      <soap12:operation soapAction="http://tempuri.org/SetMSG_ByUser_Not_Readed_As_Readed" style="document" />
    - <wsdl:input>
      <soap12:body use="literal" />
      </wsdl:input>
    - <wsdl:output>
      <soap12:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
    - <wsdl:service name="ServiceGetpublisherTable">
    - <wsdl:port name="ServiceGetpublisherTableSoap" binding="tns:ServiceGetpublisherTableSoap">
      <soap:address location="http://www.company.com/publisherService/ServiceGetpublisherTable.asmx" />
      </wsdl:port>
    - <wsdl:port name="ServiceGetpublisherTableSoap12" binding="tns:ServiceGetpublisherTableSoap12">
      <soap12:address location="http://www.company.com/publisherService/ServiceGetpublisherTable.asmx" />
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>also i have to mention that i have changed publisher references inside the code , and i also canot
    supply username and password , so i guess you canot test it. still i not shure if my definitions (namespace est.) inside my code defined correctly.
    hope you can help me with this.
    regards
    yair

  • Facing problem in xml schema xsd file registration

    Hi,
    i am facing problem in xml schema xsd file registration when
    the number of column is more. It is showing persing error.
    if i am deleting few column from xsd file . It is working otherwise
    showing error. Is there any solution for that please suggest me.
    The Error is
    ORA-31011:XML parsing failed
    ORA_19202: Error occurred in XML processing
    LPX-00230 : (message vary time to time-like invalid tag ending etc.)
    Regards
    Manoranjan
    and thanks in advance

    Where is you XML coming from. Are you sure it's valid. If you are hard coding it as a SQL String constant are you hitting the 4k / 32K limit on the size of SQL / PL/SQL constant. Have you tried loading the content from a bfile..

  • How to read back a xml file

    hi all
    I have a problem reading back an xml file.
    What I want to do is to store sensors and some vi parmaters.
    To do it, I put the parmaters in a cluster, flaten it to xml and then write the xml file.
    till here, no problem.
    When I want to read back the xml file, it doesn't work with the way I do (I use unflaten and read xml file)
    The datas i read back are not those I want to take back from my xml file.
    Can somebody help me with this point?
    The 7 datas filed are :
    string
    string
    string
    string
    U16
    I32
    I32
    Please help me with this, I cant do anything till this problem is solved.
    Thanks in advance for your help.
    ps : hereafter, the xml file i have written with labview. (I have put it in .txt to be sure the upload works.)
    put it back in test.xml to wok whith it.
    Attachments:
    test.txt ‏1 KB

    Hi,
    there are two examples in Help >> Example Finder >> Fundamentals >> File Input and Output. One is Write Data to XML File and the other is Red Data from XML File. The first will write it and the second will read it back.
    I expanded th example with the String data and the value provided in your post and it work even with the '/' in the data.Message Edited by waldemar.hersacher on 04-06-2005 11:23 PM
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • XML DevCon 2001: Submit schema and stylesheet problems- win XML Spy

    There are only a few days to submit schema and stylesheet problems for XML
    DevCon 2001 in London. If the workshop instructors use your submission
    during the conference, you win a copy of XML Spy.
    <shamelessPlug>
    XML DevCon 2001 has a content-rich technical program with a faculty that
    includes Henry Thompson (W3C Fellow), Peter Chen (IEEE Fellow, ACM
    Fellow),
    Martin Bryan (DIFFUSE Project), and authors such as Bob DuCharme, Ian
    Graham, Elliotte Rusty Harold, G. Ken Holman, Benoît Marchal, JP
    Morgenthal,
    and Simon St. Laurent. There are a variety of eBusiness sessions,
    including
    panel discussions and presentations about ebXML, Web Services, and UDDI.
    The program includes presentations by Jonathan Borden, Ron Bourret, Lee
    Buck, Alex Chaffee, Mark Colan, John Evdemon, Meike Klettke, Andy
    Longshaw,
    Ingo Macherius, Simon Nicholson, David Orchard, Sebastian Rahtz, Daniel
    Rivers-Moore, Michael Rys, Krishna Sankar, Matt Sergeant, Richard Tobin,
    Priscilla Walmsley, David RR Webber and other distinguished faculty.
    </shamelessPlug>
    http://www.xmldevcon2001.com/London/html/conference.php
    For a free pass to exhibits and special events (keynotes, joint XML UK and
    British Computer Society meeting, OASIS XPath/XSLT meeting, vendor
    presentations):
    http://www.xmldevcon2001.com/London/html/special_events.php
    Public submissions (schemas and stylesheets)
    Three members of the W3C Schema Working Group (Michael Rys, Henry
    Thompson, Priscilla Walmsley) will teach a Schema Workshop. Submit
    problem schemas to them by e-mail:
    [email protected]
    or
    http://www.xmldevcon2001.com/London/html/session.php?code=W5
    Sebastian Rahtz, Bob DuCharme, Benoît Marchal, and Ken Holman will
    present the "Stylesheets and Transformations: Best Practices" workshop on
    Thursday, February 22 in London. To submit a stylesheet or problem
    description for their workshop:
    [email protected]
    or browse to:
    http://www.xmldevcon2001.com/London/html/session.php?code=T17
    ========== Ken North ======================
    See you at Javacon 2001 (New York, March 1)
    www.javacon2001.com
    XML DevCon 2001: London (February 21-23) New York (April 8-11)
    www.xmldevcon2001.com
    =======================================

    Looks okay to me. But then I have no idea of what those "problems" are that you mentioned. Was there a particular reason you didn't tell us what they are?

  • Problem validating XMl document

    Hi everyone,
    I'm facing a problem validating a XML document with Apache toolkit under windows XP and eclipse 3.0
    I generate a pair of public/private keys using the RSA algorithm. The keys are of arbitrary length, but satisfying RSA conditions, ie we can encrypt and decrypt.
    I can sign my XML document, but no way to validate it. Validation is only ok when I generate random keys using the KeyPairGenerator.
    Do you think that arbitrary length keys don't allow to validate XML document. And do you have any idea how to solve the problem ( I'm not allowed to generate fixed length keys) ?
    Thansk a lot for your precious help.

    solved!
    urghh...forgot to load th eschema..duh. (must be friday)
    here's the fixed code:
        // parse the xml document (validate the xml string using a schema  file)
        // the xml document does not specified the System ID or location of
        // schema..and use no namespace
        public void parse(HandlerType type, String xmldoc) throws SAXException, IOException {
            File           schema      = schemaMap.get(type);
            DefaultHandler handler     = handlerMap.get(yype);
            XMLReader   reader = XMLReaderFactory.createXMLReader(VENDOR);
            InputSource source = new InputSource(new StringReader(xmldoc));
            reader.setContentHandler(handler);
            reader.setFeature("http://xml.org/sax/features/validation", true);
            reader.setFeature("http://apache.org/xml/features/validation/schema", true);
            reader.setFeature("http://apache.org/xml/features/validation/schema-full-checking", true);
            reader.setProperty("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation",
            "file:///" + schema.getAbsolutePath());
            reader.parse(source);          
        }

  • Problem parsing XML with schema when extracted from a jar file

    I am having a problem parsing XML with a schema, both of which are extracted from a jar file. I am using using ZipFile to get InputStream objects for the appropriate ZipEntry objects in the jar file. My XML is encrypted so I decrypt it to a temporary file. I am then attempting to parse the temporary file with the schema using DocumentBuilder.parse.
    I get the following exception:
    org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element '<root element name>'
    This was all working OK before I jarred everything (i.e. when I was using standalone files, rather than InputStreams retrieved from a jar).
    I have output the retrieved XML to a file and compared it with my original source and they are identical.
    I am baffled because the nature of the exception suggests that the schema has been read and parsed correctly but the XML file is not parsing against the schema.
    Any suggestions?
    The code is as follows:
      public void open(File input) throws IOException, CSLXMLException {
        InputStream schema = ZipFileHandler.getResourceAsStream("<jar file name>", "<schema resource name>");
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        DocumentBuilder builder = null;
        try {
          factory.setNamespaceAware(true);
          factory.setValidating(true);
          factory.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
          factory.setAttribute(JAXP_SCHEMA_SOURCE, schema);
          builder = factory.newDocumentBuilder();
          builder.setErrorHandler(new CSLXMLParseHandler());
        } catch (Exception builderException) {
          throw new CSLXMLException("Error setting up SAX: " + builderException.toString());
        Document document = null;
        try {
          document = builder.parse(input);
        } catch (SAXException parseException) {
          throw new CSLXMLException(parseException.toString());
        }

    I was originally using getSystemResource, which worked fine until I jarred the application. The problem appears to be that resources returned from a jar file cannot be used in the same way as resources returned directly from the file system. You have to use the ZipFile class (or its JarFile subclass) to locate the ZipEntry in the jar file and then use ZipFile.getInputStream(ZipEntry) to convert this to an InputStream. I have seen example code where an InputStream is used for the JAXP_SCHEMA_SOURCE attribute but, for some reason, this did not work with the InputStream returned by ZipFile.getInputStream. Like you, I have also seen examples that use a URL but they appear to be URL's that point to a file not URL's that point to an entry in a jar file.
    Maybe there is another way around this but writing to a file works and I set use File.deleteOnExit() to ensure things are tidied afterwards.

  • Problem writing XML after opening dialog

    I'm using ScriptUI to create and update XML in a document (using Document.XMLElements methods).
    Before opening a Window with ScriptUI, I can read and write XML without problem.
    But after opening a Window containing some ScriptUI resources, I can only read the existing XML BUT NOT WRITE IT!
    My writing method is called from a button event :
    var myXMLRootNode = /* instanciated */
    myWindow.okButton = /* instanciated */
    myWindow.okButton.onClick = function() { myXMLRootNode.xmlElements.add(myTag, object) };
    myWindow.show();
    It looks like the onClick callback works OK for reading (I can recover all existing values without problem) but not for writing.
    Any idea ?

    Hey!
    Well, the thing is that you have to close dialog first before writing to document.
    myWindow.okButton.onClick = function(){myWindow.close(1);};
    var myWin = myWindow.show();
    if(myWin == true){
        myXMLRootNode.xmlElements.add(myTag, object);
    Hope it helps!
    tomaxxi
    http://indisnip.wordpress.com/

  • I am facing a new problem with xml schema, plz help me

    Hi @,
    I am facing a problem with xml schema validation. Below is my code.
    public void initialize(String cfgFileName) {
    try {
    try {
    DOMParserWrapper parser = (DOMParserWrapper)Class.forName("dom.wrappers.DOMParser").newInstance();
    parser.setFeature( "http://apache.org/xml/features/dom/defer-node-expansion",true );
    parser.setFeature( "http://xml.org/sax/features/validation",true);
    parser.setFeature( "http://xml.org/sax/features/namespaces",true );
    parser.setFeature( "http://apache.org/xml/features/validation/schema",true );
    parser.setFeature( "http://apache.org/xml/features/validation/schema-full-checking",true );
    Document document = parser.parse(cfgFileName);
    System.out.println("Vijay .. code .. damar\n");
    }catch (org.xml.sax.SAXParseException spe) {
    } catch (org.xml.sax.SAXNotRecognizedException ex ){
    } catch (org.xml.sax.SAXNotSupportedException ex ){
    } catch (org.xml.sax.SAXException se) {
    if (se.getException() != null)
    se.getException().printStackTrace(System.err);
    else
    se.printStackTrace(System.err);
    }catch (Exception e) {
    System.out.println("Caught unknown exception : \n");
    e.printStackTrace(System.err);
    System.out.println("Vijay .. code .. success\n");
    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
    DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
    //docBuilder.setErrorHandler(myErrorHandler);
    cfg = docBuilder.parse(new File(cfgFileName));
    cfg .getDocumentElement ().normalize ();
    } catch (Exception e) {
    e.printStackTrace();
    In the above code I am parsing the xml file and i am doing schema validation. Schema validation is proper and it is validating correctly. Only problem is that, It is validating and showing error correctly correctly but it is not catching that error.
    For clear understanding I am printing one statement before parsing and after parsing.
    SYSTEM.OUT.PRINTLN("Vijay .. code .. damar\n") this is before parsing
    SYSTEM.OUT.PRINTLN("Vijay .. code .. success\n") this is after parsing
    Here what is happening means, It is validating correctly and showing error :
    [Error] nw_layout-new.xml:800:97: Datatype error: Value 'y' does not match regular expression facet 'yes|no'..
    Vijay .. code .. damar
    Vijay .. code .. success
    Here it is showing error and still continueing not catching.
    Plz give solution for this.
    Thanks
    vijay K

    Hello dipthebe,
    Check out the articles below go through troubleshooting steps for your iPhone when the screen is unresponsive. You may want to try and restore your iPhone as a new device and then test out what happens when you miss a call to see if the issue is still present afterwards.
    iPhone, iPad, iPod touch: Troubleshooting touchscreen response
    http://support.apple.com/kb/ts1827
    Use iTunes to restore your iOS device to factory settings
    http://support.apple.com/kb/HT1414
    Regards,
    -Norm G.

  • How to read  and write XML in java

    I have a code that reads a large XML file, splits it into smaller files, filters and then writes it into a new XML file. My problem is that I had coded the input file name into the code, so that only the specified file can be read. How can I rewrite my code to be able to take any input xml and perform the same operation? Here's a portion of my code below:
                            File file = new File("c:\\APAdjustmentJVDoc_FINAL.xml");
                        output = new BufferedWriter(new FileWriter(file));
                        for (int i = 1; i < 79; i++) {
                             fIStream = new FileInputStream("c:\\APAdjustmentJVDoc_new" + i + ".xml");
                             loRead = new InputStreamReader(fIStream);
                             doc = XMLUtil.transformToNode(loRead, false);
                             System.out.println("Reading from file " + "c:\\APAdjustmentJVDoc_new" + i + ".xml");
                             writeFile(doc, docIdList, output);
                             fIStream.close();
                             loRead.close();
                        System.out.println("Output file complete");
                   } catch (Exception e) {
                        e.printStackTrace();
                   } finally {
                        if (output != null) {
                             output.close();
                        if (fIStream != null) {
                             fIStream.close();
              } catch (Exception e) {
                   e.printStackTrace();
                 

    You need to pass your filename String as a parameter to your functionality. It depends how you're currently set up though. We can't really see the top of your call so it's difficult to determine what you are calling and we don't really know from where you're calling either.
    If you're running standalone, then on launch of the application, you can feed in a file name as an argument that you can read in in String args[] in the main function and pass down to your XML splitter.
    If you're a method in a class that's part of a bigger pile, you can feed the file name as a String to the method from wherever you call from if it makes sense architecturally.
    You might also want to pass down a File object if that makes sense in your current code (i.e. if you're using your file for other purposes prior to the split, to avoid recreating closing/opening for no reason).
    Depends what you're trying to do. If I put together a piece like this, I would probably create an <yourcurrentrootpackage>.xml.splitter package.
    Also, on a side note, you're problem isn't really reading and writing XML in java, but seems more to be making your functionality generic so that any XML file can be split with your code.
    Regards
    JFM

  • Problem receibing xml data

    anyone else noticed this? it happens sometimes when going to www.apple.com and switching to another site while www.apple.com still loads. safari or apple.com problem?

    I got a same problem when I access to www.apple.com also, after this "problem receibing xml data" dialog appeared I cannot play streaming video(WMP).

  • Read data From XML

    hi
    I am new to XML.I want to read data from XML input ....For test purpose i have writte following
    procedure , but when i print output value it shows ...NO ROWS SELECTED
    Actually i want to read [ trd_relate ] value from following XML Input
    '<ROOT><TRD trd_relate = "somevalue" trd_mainid = "152" trd_rate = "0.0000"/></ROOT>'
    plese help me to solve this problem.
    Thanks
    create or replace procedure xml_test1(p_xml clob,rc1 in out mypkg.rc)
    as
    aaa xmltype;
    begin
    aaa :=xmltype(p_xml);
    open rc1 for
    SELECT extractValue(aaa, '/ROOT/TRD/trd_mainid') SOME_NAME
    FROM table(XMLSequence(extract(aaa, '/ROOT/TRD/trd_mainid'))) ResultSet;
    end xml_test1;
    var a refcursor;
    exec xml_test1('<ROOT><TRD trd_relate = "" trd_mainid = "152" trd_rate = "0.0000"/></ROOT>',:a);
    print a;
    **************************************

    Hi,
    try this:
    1 create or replace function test(xml xmltype, qry varchar2) return varchar2 is
    2 xx varchar2(100);
    3 begin
    4 select extractValue(xml, qry)
    5 into xx
    6 from dual;
    7 return xx;
    8* end;
    SQL> /
    Function created.
    SQL> variable out varchar2(100)
    SQL> exec :out := test(xmltype('<ROOT><TRD trd_relate = "somevalue" trd_mainid = "152" trd_rate = "0.0000"/></ROOT>'), '/ROOT/TRD/@trd_relate');
    SQL> print out
    OUT
    somevalue
    Bartek

  • Error when reading data from XML using JAXB?

    Hi all,
    I get the error message when reading data from XML using JAXB.
    [org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.]
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException
    (AbstractUnmarshallerImpl.java:315)
         at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:481)
         at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:199)
         at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:137)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:142)
    I don't find the reason, please help!
    Thanks in advance!

    The problem is sovled.

Maybe you are looking for

  • Dunning Letters- Invoice Date Order

    Hi all, When running Dunning the invoices are shown NOT in date order ie oldest invoice first in the list and then going through in date order to the latest at the bottom. Is it possible to have the oldest invoice at the top down and going down to th

  • Adobe Reader error

    Using Windows 7. When trying to open any PDF I get an "Adobe Reader has encountered a problem and needs to close" error. I uninstalled Reader and reinstalled the most current version from the Adobe website. After reinstalling, I get the same error me

  • How to view "date from" and "date to"

    Hi, I have loaded EMP data. In the mapping "date from" and "date to" are visible. But these fields are not seen when I display the EMP data.Can someone please tell me how to view these fields? Thanks, Williams

  • Authentication error with Yammer Data Source

    Hi, I want to show Yammer post in my Siena application (Beta 3). I have added Yammer data source by providing Client id (by registering app) and provided redirect URL as my organization Yammer page (https://www.yammer.com/******.com). However when I

  • Updating iPad software feature

    Does the iPhone and iPad software update feature automatically do anything before you actually check for updates via the built in function? Or, does it only do it when you go through the motions..