LPX-00601: Invalid token in: using logical AND operator in XQuery

Hi Pro's,
I am working on DB version 10.2.0.3, I have loaded this document into XMLType column:
<ROOT>
<COUNTRY>
<NAME>India</NAME>
<PERSON>
<NAME>Harinath</NAME>
<CITY>Bangalore</CITY>
<STATE>Karnataka</STATE>
<IMMI_STATUS>Citizen</IMMI_STATUS>
</PERSON>
<PERSON>
<NAME>Mohan</NAME>
<CITY>Kakinada</CITY>
<STATE>Andhra Pradesh</STATE>
<IMMI_STATUS>Citizen</IMMI_STATUS>
</PERSON>
</COUNTRY>
<COUNTRY>
<NAME>USA</NAME>
<PERSON>
<NAME>Drew P</NAME>
<CITY>Appleton</CITY>
<STATE>WI</STATE>
<IMMI_STATUS>Citizen</IMMI_STATUS>
</PERSON>
<PERSON>
<NAME>Bush</NAME>
<CITY>Washington</CITY>
<STATE>DC</STATE>
<IMMI_STATUS>Citizen</IMMI_STATUS>
</PERSON>
<PERSON>
<NAME>Harinath</NAME>
<CITY>Atlanta</CITY>
<STATE>GA</STATE>
<IMMI_STATUS>Alien</IMMI_STATUS>
</PERSON>
</COUNTRY>
</ROOT>
This query returns one row : (As Expected)
===============================
SELECT extractValue(rec.xmldata, '/ROOT/COUNTRY[PERSON/NAME="Drew P"]/NAME') C_COUNTRY
FROM (SELECT VALUE(xml) xmldata
FROM XXSSI_XML_STG stg
,TABLE(XMLSequence(extract(stg.XMLDATA, '//ROOT'))) xml
WHERE stg.REQUEST_ID = 4204203) rec
This query fails: TRUE as "Harinath" appears twice in the document once in "India" and once in "USA";
======================================================
SELECT extractValue(rec.xmldata, '/ROOT/COUNTRY[PERSON/NAME="Harinath"]/NAME') C_COUNTRY
FROM (SELECT VALUE(xml) xmldata
FROM XXSSI_XML_STG stg
,TABLE(XMLSequence(extract(stg.XMLDATA, '//ROOT'))) xml
WHERE stg.REQUEST_ID = 4204203) rec ;
To fix the error I introduced "LOGICAL AND" in the XPath: THIS FAILS
===================================================
SELECT extractValue(rec.xmldata, '/ROOT/COUNTRY[PERSON/NAME="Harinath" AND IMMI_STATUS="Citizen"]/NAME') C_COUNTRY
FROM (SELECT VALUE(xml) xmldata
FROM XXSSI.XXSSI_XML_STG stg
,TABLE(XMLSequence(extract(stg.XMLDATA, '//ROOT'))) xml
WHERE stg.REQUEST_ID = 4204203) rec ;
Please help!!!!!!

Hi !!!
Im sooo thankful to you... it works!!!
Learnt a lesson today "dont blindly go by those user guides" I was refering to Example 6–8 of "B14259" 10g Developer Guide (Page 282) which has this query
SELECT extract(OBJECT_VALUE, '/PurchaseOrder/Item').getClobval()
FROM mypurchaseorders p
WHERE existsNode(OBJECT_VALUE,
'/PurchaseOrder[PONum=1001 AND Company = "Oracle Corp"]') = 1;
may be a printing error :(
Thanks a lot.

Similar Messages

  • 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

  • LPX-00601: Invalid token Error in DBMS_XSLPROCESSOR

    Hi All,
    I am using DBMS_XMLDOM and DBMS_XSLPROCESSOR to parse the XML file.
    the following code was working fine in Release 10.1.0.4.0
    l_n :=DBMS_XSLPROCESSOR.selectsinglenode
    (xmldom.makenode (doc)
    ,'/tmf:MTOSI_InventoryData/tmf:mdList/tmf:md/tmf:tlList/tmf:tlInv/tmf:tlNm');
    v_mux_id :=DBMS_XMLDOM.getnodevalue(DBMS_XMLDOM.getfirstchild (l_n));
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - 64bi
    PL/SQL Release 10.1.0.4.0 - Production
    CORE 10.1.0.4.0 Production
    TNS for Solaris: Version 10.1.0.4.0 - Production
    NLSRTL Version 10.1.0.4.0 - Production
    But we have copied the same code in Release 10.2.0.2.0 i am getting the following error Plese do the needful
    11:42:03 AM ORA-31011: XML parsing failed
    11:42:03 AM : Error occurred in XML processing
    11:42:03 AM LPX-00601: Invalid token in: '/tmf:MTOSI_InventoryData/tmf:mdList/tmf:md/tmf:tlList/tmf:tlInv/tmf:tlNm'
    11:42:03 AM ORA-06512: at line 9
    11:42:03 AM *** Script stopped due to error ***
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bi
    PL/SQL Release 10.2.0.2.0 - Production
    CORE 10.2.0.2.0 Production
    TNS for Solaris: Version 10.2.0.2.0 - Production
    NLSRTL Version 10.2.0.2.0 - Production
    Plese do the needful
    Thanks in Advance
    Elan

    FUNCTION SELECTSINGLENODE RETURNS RECORD
    Argument Name       Type                 In/Out Default?
       ID                          RAW(13)           OUT
       N                           RECORD           IN
       ID                          RAW(13)            IN
    PATTERN                VARCHAR2        IN
    NAMESPACE          VARCHAR2        IN     DEFAULTYou need to provide the namespace prefix mapping for the prefixes tmf via the NAMESPACE parameter (eg 'xmlns:tmf="xxxxxx"'

  • LPX-00601: Invalid token

    Hallo,
    and the next problem arised when trying to
    SELECT XMLTransform(x.xmldoc,
    (select stylesheet from stylesheet_tab where id = 1)).getStringVal()
    AS result
    FROM testtab x;
    =>
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00601: Invalid token in
    <xsl:value-of select="auskunfteiAntwort[@xsi:type='faResponse']/auskunftAusCacheA1"/>
    Whats the problem with this line ?
    The xsl file already works when the tranformation is done with java instead of oracle.
    Thanks,
    Jochen

    SQL> select * from nls_session_parameters;
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY $
    NLS_COMP BINARY
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    SQL> select * from nls_database_parameters;
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CHARACTERSET AL32UTF8
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY $
    NLS_COMP BINARY
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    NLS_NCHAR_CHARACTERSET UTF8
    NLS_RDBMS_VERSION 10.2.0.1.0
    I don't find something like a xsi namespace prefix.
    In fact thats the first time "xsi" appears in this stylesheet. Is Oracle more strict than the "standard" ?

  • "LPX-00601: Invalid token in:" when retrieving namespaced attribute

    I'm trying to retrieve an attribute value from an XML document as follows:
    declare
       l_url varchar2(500);
       l_xml xmltype;
    begin
       l_xml := xmltype('<WMT_MS_Capabilities version="1.1.1">
                          <Capability>
                             <Layer>
                               <Layer>
                                  <Style>
                                    <Name>default</Name>
                                    <Title>default</Title>
                                    <LegendURL width="233" height="141">
                                       <Format>image/png</Format>
                                       <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
                                                       xlink:type="simple"
                                                       xlink:href="http://very_long_url"/>
                                    </LegendURL>
                                  </Style>
                              </Layer>
                              </Layer>
                              </Capability>
                          </WMT_MS_Capabilities>');
       select extractvalue(l_xml
                          ,'//WMT_MS_Capabilities/Capability/Layer/Layer/Style/LegendURL/OnlineResource@xlink:href'
                          ,'xmlns:xlink="http://www.w3.org/1999/xlink"')
         into l_url
         from dual;
         dbms_output.put_line(l_url);
    end;This code executes fine in a 9.2.0.5 database but on Oracle 10.2.0.4 I get:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00601: Invalid token in: '//WMT_MS_Capabilities/Capability/Layer/Layer/Style/LegendURL/OnlineResource@xlink:href'
    ORA-06512: at line 26What am I doing wrong?

    Found the bug. there is a / missing before the @ in the xpath expression. 9R2 does not seem to care about this.
    Correct path=
    '//WMT_MS_Capabilities/Capability/Layer/Layer/Style/LegendURL/OnlineResource/@xlink:href'

  • Complex xml with multiple namespaces giving LPX-00601: Invalid token error

    Hi
    Apologies if this is a really simple question.
    I have not worked with xml before and I'm drowning in different ways to do the extract.
    I have a very complex xml, sample below, which I'm trying to do one siple extract to get myself going.
    I have the data in a table in an xmltype column,
    I am trying to extract containernumber first and get the error.
    select xml_column, extract(xml_column,'/env:Envelope/env:Body/ns0:QueryCntrNumberResponse/ns0:QueryResContainerDetail/ns1:ContainerNumber/ns2:ContainerNumber')
    from test_xml;
    Not sure if I should use the namespaces and have tried without but results are always NULL
    I would really appreciate any pointers around these ultiple namespaces.
    Thanks
    Nicki
    XML Sample
    <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xmlns:ns0="http://com.cargosmart.cargotracking.webservice.cntr.dto"
                  xmlns:ns1="http://com.cargosmart.cargotracking.webservice.common.dto"
                  xmlns:ns2="http://com.cargosmart.cargotracking.webservice.basic.dto"
                  xmlns:ns3="http://com.cargosmart.cargotracking.webservice.bl.dto"
                  xmlns:ns4="http://com.cargosmart.cargotracking.webservice.bkg.dto">
      <env:Body>
        <ns0:QueryByCntrNumberResponse>
          <ns0:QueryRes ult="">
            <ns0:QueryCriteria>
              <ns1:CarrierSCACCode>APLU</ns1:CarrierSCACCode>
              <ns1:ContainerNumber>APZU344693-1</ns1:ContainerNumber>
            </ns0:QueryCriteria>
            <ns0:ContainerDetail>
              <ns1:ContainerNumber>
                <ns2:ContainerNumber>APZU344693</ns2:ContainerNumber>
                <ns2:ContainerCheckDigit>1</ns2:ContainerCheckDigit>
                <ns2:GrossWeight>
                  <ns2:Weight>20260.8</ns2:Weight>
                  <ns2:WeightUnit>KGS</ns2:WeightUnit>
                </ns2:GrossWeight>
              </ns1:ContainerNumber>
    NOT THE FULL COLUMN

    Could I just ask you one more question.
    I had already expanded the query to include the repeating sections using xmlsequence.
    Has that been replaced too?
                select extractvalue(xml_column,'/env:Envelope/env:Body/ns0:QueryByCntrNumberResponse/ns0:QueryResult/ns0:ContainerDetail/ns1:ContainerNumber/ns2:ContainerNumber',
                  'xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" 
                  xmlns:ns0="http://com.cargosmart.cargotracking.webservice.cntr.dto"
                  xmlns:ns1="http://com.cargosmart.cargotracking.webservice.common.dto"
                  xmlns:ns2="http://com.cargosmart.cargotracking.webservice.basic.dto"
                  xmlns:ns3="http://com.cargosmart.cargotracking.webservice.bl.dto"
                  xmlns:ns4="http://com.cargosmart.cargotracking.webservice.bkg.dto"') col1,
                  extractvalue(value(t2),'/ns1:Event/ns1:EventDescription', 'xmlns:ns1="http://com.cargosmart.cargotracking.webservice.common.dto"') Event_Description,
                  extractvalue(value(t2),'/ns1:Event/ns1:EventDT/ns2:LocDT', 'xmlns:ns1="http://com.cargosmart.cargotracking.webservice.common.dto" xmlns:ns2="http://com.cargosmart.cargotracking.webservice.basic.dto"') Event_DT,
                  extractvalue(value(t2),'/ns1:Event/ns1:Location/ns2:LocationName', 'xmlns:ns1="http://com.cargosmart.cargotracking.webservice.common.dto" xmlns:ns2="http://com.cargosmart.cargotracking.webservice.basic.dto"') location
    from test_xml t1,
    table(xmlsequence(extract(t1.xml_column,'/env:Envelope/env:Body/ns0:QueryByCntrNumberResponse/ns0:QueryResult/ns0:ContainerDetail/ns1:Event','xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" 
                  xmlns:ns0="http://com.cargosmart.cargotracking.webservice.cntr.dto"
                  xmlns:ns1="http://com.cargosmart.cargotracking.webservice.common.dto"
                  xmlns:ns2="http://com.cargosmart.cargotracking.webservice.basic.dto"
                  xmlns:ns3="http://com.cargosmart.cargotracking.webservice.bl.dto"
                  xmlns:ns4="http://com.cargosmart.cargotracking.webservice.bkg.dto"'))) t2;

  • Error occurred in XML processing LPX-00601: Invalid token in

    Hello all, I'm new here and hope to find a resouce to learn from and give back to when possible.
    I am parsing an xml file in a stored proc. The file parses out fine when I make a small modification to the source xml file. Here is the mod:
    These are the first 2 lines of the source file:
    <?xml version="1.0" encoding="UTF-8"?>
    <wc:COLLECTION xmlns:wc="http://www.company.com/sub/1.0">
    If I remove the colon from the element in the second line (change wc:COLL... to wcCOLL....), and make the corresponding change in the closing element tag, the code can parse the file just fine.
    Here is the primary code that throws the error in my proc:
    PROCEDURE IMPORT_WC_XML
    AS
    v_parser xmlparser.Parser;
    v_doc xmldom.DOMDocument;
    v_nl xmldom.DOMNodeList;
    v_n xmldom.DOMNode;
    BEGIN
    v_parser := xmlparser.newParser;
    xmlparser.parse(v_parser, 'F:\SQLLOG\test.xml');
    v_doc := xmlparser.getDocument(v_parser);
    xmlparser.freeParser(v_parser);
    v_nl := xslprocessor.selectNodes(xmldom.makeNode(v_doc),'/wc:COLLECTION/AddedParts/Part');
    If I remove the colon in the root element and remove the colon in this last line of my code, it runs fine.
    Any help would be appreciated. I'm a little new to xml.
    Regards,
    Glen

    Ok, I have resolved the issue. Just in case someone has the same problem, I'm posting what I found to fix it:
    The function:
    v_nl := xslprocessor.selectNodes(n,pattern,namespace);
    has a third argument, apparently optional, named "namespace".
    I added the namespace as defined in the xml file and it works fine now.
    v_nl := xmldom.makeNode(v_doc),'/wc:COLLECTION/Transactions/Transaction','xmlns:wc=http://www.company.com/sub/1.0');
    Regards
    Glen Herman

  • HOW TO USE LOGICAL AND OR CONDITION TOGETHER

    Please do not post subject in ALL CAPITALS
    Hi All there,
    How to use logical and or condition together
    I wanted to use logical AND OR condition together in where clause of Select Query.
    eg where xyz and or abc
    Regards
    Sagar
    Edited by: Matt on Mar 17, 2009 1:05 PM
    Edited by: Matt on Mar 17, 2009 1:05 PM

    hi,
      You cannot use the logical and  or condition together at the same time in SQL statement. Sachin is correct while using the and and or in the same condition. You can get the data using or condition in SQL statement, and then use the delete statement of internal table using the end condition. please find the following code for the same.
    select *
      from dtab
    where cond1 eq 'A1'
         or cond2 eq 'A2'.
    if sy-subrc eq 0.
      delete itab where cond1 eq 'A1' and 'A2'.
    endif.
    regards,
    Veeresh

  • Validator using logical AND or logical OR

    How can I validate multiple TextInputs using logical AND or
    logical OR. For example:
    If TextInput1 == Null || TextInput2 == Null causes a
    validation error if both are null but passes validation as long as
    one field is populated or both fields are populated.
    John

    You could have a Boolean variable that is initially false,
    and only becomes true when one of the TextInput becomes populated.
    The variable could be set in the TextInput "change" event.
    Your validation code would check the value of that Boolean
    variable.

  • Audio recording using Logic and Mbox

    Sirs,
    I've to import vinyl using Logic and the Mbox (Digimedia) card. Does anyone have experience in such kind of operation?
    Thanks in advance for your help.
    titanium 1ghz   Mac OS X (10.3.8)   Logic Platinum 7.1 - Mbox audio card

    No MBox, but I just patch my turntable into a phono preamp I bought at Radio Shack about 25 years ago (in order to have RIAA equalization) and the preamp outs into your interface and you can record like normal.

  • How to get a column by applying logical AND operator on two column ?

    All column are VARCHAR2 data type.
    I have table output in this way :
    col1 col2
    True True
    True False
    False FalseBut i want a additional column in this way :
    col1 col2 result
    True True True
    True False False
    False False FalseAs the output indicates its clear that resut column is logical AND operator
    on col1 and col2. How to achieve this ?

    try this
    WITH logic AS
         (SELECT 'TRUE' col1, 'TRUE' col2
            FROM DUAL
          UNION ALL
          SELECT 'TRUE' col1, 'FALSE' col2
            FROM DUAL
          UNION ALL
          SELECT 'FALSE' col1, 'TRUE' col2
            FROM DUAL
          UNION ALL
          SELECT 'FALSE' col1, 'FALSE' col2
            FROM DUAL)
    SELECT col1, col2,
           CASE
              WHEN 'FALSE' IN (col1, col2)
                 THEN 'FALSE'
              ELSE 'TRUE'
           END AS log_and,
           CASE
              WHEN 'TRUE' IN (col1, col2)
                 THEN 'TRUE'
              WHEN 'FALSE' IN (col1, col2)
                 THEN 'FALSE'
           END AS log_or
      FROM logic 
    Explain complete.
    PLAN_TABLE_OUTPUT                                                              
    | Id  | Operation        | Name | Rows  | Bytes | Cost (%CPU)|                 
    |   0 | SELECT STATEMENT |      |     4 |    32 |     8   (0)|                 
    |   1 |  VIEW            |      |     4 |    32 |     8   (0)|                 
    |   2 |   UNION-ALL      |      |       |       |            |                 
    |   3 |    FAST DUAL     |      |     1 |       |     2   (0)|                 
    |   4 |    FAST DUAL     |      |     1 |       |     2   (0)|                 
    |   5 |    FAST DUAL     |      |     1 |       |     2   (0)|                 
    |   6 |    FAST DUAL     |      |     1 |       |     2   (0)|                 
    Note                                                                           
       - 'PLAN_TABLE' is old version                                               
    16 rows selected.regards,
    friend

  • LPX-00217 invalid character error - Using reference characters in XML file

    Hi, I hope you will help me to understand and to fix the error I get during insert of an XML file into a table with XML Type field.
    I used Oracle documentation for this:
    1. Create table
    CREATE TABLE XMLDOC
    ( XMLCOLUMN xmltype);
    2. Create external directory
    CREATE OR REPLACE DIRECTORY FILESDIR AS 'E:\ora_xml_test\';
    3. Create function
    CREATE OR REPLACE function DSS.getClobDocument(
    filename in varchar2,
    charset in varchar2 default NULL)
    return CLOB deterministic
    is
    file bfile := bfilename('FILESDIR',filename);
    charContent CLOB := ' ';
    targetFile bfile;
    lang_ctx number := DBMS_LOB.default_lang_ctx;
    charset_id number := 0;
    src_offset number := 1 ;
    dst_offset number := 1 ;
    warning number;
    begin
    if charset is not null then
    charset_id := NLS_CHARSET_ID(charset);
    end if;
    targetFile := file;
    DBMS_LOB.fileopen(targetFile, DBMS_LOB.file_readonly);
    DBMS_LOB.LOADCLOBFROMFILE(charContent, targetFile,
    DBMS_LOB.getLength(targetFile), src_offset, dst_offset,
    charset_id, lang_ctx,warning);
    DBMS_LOB.fileclose(targetFile);
    return charContent;
    end;
    And now appears the problem when I use different character references - one of them are parsed by the XML parser and another -are not:
    test1.xml - Contains a charachter from Latin language -ă (&#x103)
    <?xml version="1.0" encoding="UTF-8"?>
    <ROWSET>
    <ROW
    <IDNO>1</IDNO>
    <NAME>aaa (&#x103)</NAME>
    </ROW>
    </ROWSET>
    --a semicolumn must be added after 103
    SQL> insert into XMLDOC values(xmltype(getClobDocument('test1.xml','UTF8')));
    1 row created.
    test2.xml - Contains a charachter from Cyrillic language -ш (&#x404)
    <?xml version="1.0" encoding="UTF-8"?>
    <ROWSET>
    <ROW>
    <IDNO>1</IDNO>
    <NAME>aaa (&#x404)</NAME>
    </ROW>
    </ROWSET>
    --a semicolumn must be added after 404
    SQL> insert into XMLDOC values(xmltype(getClobDocument('test2.xml','UTF8')));
    insert into XMLDOC values(xmltype(getClobDocument('test2.xml','UTF8')))
    ERROR at line 1:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00217: invalid character 1028 (\u0404)
    Error at line 5
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at line 1
    I am not familiar to Unicode and encoding maybe I ' missing something.
    Please help!!!

    Which database version are you using and what is the characterset used during its creation...?
    There is a lot on this forum which has been already answered / addressed but the database must support it, in other words the characterset must support it. Among others, see Re: XML-Document with special characters for instance.
    Conversion like you are doing (&#x103) is not needed.

  • For those using Logic and Protools

    This is for any of you out there that use both Logic and Protools in your workflow. What are the reason(s) that you might do this? How do (if they do) these programs augment one another in the process of creating music? From initial idea to final mix, where do these programs plug in and why?
    Thanks in advance

    Andrew Tokuda wrote:
    I hear that there is no automatic Plug-In Delay Compensation in Pro Tools. You need to set a value manually. According to a training video I saw of Pro Tools, this appears to be true. I also hear that PDC still isn't implemented in the version 8.0 release, though I can't confirm that.
    For a guy that's been using Logic for years, I may just be spoiled as far a PDC is concerned, but it seems like for all those missing features in Logic (such as Elastic Time), there are important things we take for granted that aren't available on the PT side. Add the 32-channel (16 stereo!) limit in LE that we rarely think about in Logic.
    That said, PDC and channel limits aside, version 8 of PT seems like a pretty compelling upgrade from 7.x. I hope Apple is keeping an eye on things. If there's ever a serious competition between platforms as far as features go, it starts now.
    -droo
    You're right.
    but the one thing I do like about not having the computer calculate the delay, is that when I am doing my final mixing, I can calculate it myself. this might be a little geeky for some, but in the end it allows me to control this aspect of the DAW that I cannot do in other DAWs.
    I have noticed sometimes in Logic that some things do not get played back at the same absolute timepoint. In other words, i suspect the PDC might be changing upon each playback. This is fine for most music, but when doing either electronica or Jazz (believe it or not) this is not good.
    This has only happened to me once or twice, but is something to note. In PT HD, the delay remains constant, so dealing with it is a one time deal. Set your delays, and you're done.
    Cheers

  • Using logical and while processing graphics

    Hi all.
    I've seen a lot of code like this:
    public void method(byte r, byte g, byte b) {
    r = r & 0xFF
    b = b & 0xFF
    g = g & 0xFF
    <some processing code>
    }Could anybody explain the reason of using such strange operation?
    In math it means that we do nothing ( a & 0xFF = a)
    All samples I saw in graphic processing code exmples ( [forum example|http://forums.sun.com/thread.jspa?messageID=10523214] )

    Read those samples more closely. I bet r,g,b are ints.

  • Scan to Email not working - Invalid Credentials error (using gmail and 2-factor authentication)

    I configured the HP OfficeJet 8600 printer for scan to email using the Embedded Web Server interface. In the Web interface, I added/entered an email address for my gmail account, and set the correct SMTP server details, and entered 465 for the port number. I checked the "Always use secure connection" box, as well as the "SMTP requires authentication for outgoing email messages" box. I entered correct SMTP user ID and password. Yet when I did a test, I got an error "Invalid credentials" After a lot of frustration, and trying all sorts of things, I eventually got the idea to try another email account. This time I tried a different email account, a netzero email account, configured the smtp server details for it etc. And this time when I tested the netzero email address it worked. I tried the scan to email on the printer, and it worked for the Netzero email account. it just didnt work for the gmail account. I had a while back turned on 2-factor authentication. I went to gmail settings and requested an "App password" for my HP printer. Google/gmail displayed a 16 character password, which I then entered into the password box in the HP OfficeJet printer Embedded Web Server interface (instead of my usual password), for the gmail account. And this time when I tested the email account - it worked! Problem solved! .. I share this just in case anyone else is having the same problem I had, and is going through the same frustrating experience I endured!  

    Thank you. This helped TREMENDOUSLY! 

Maybe you are looking for

  • Dynamic Converter - convert Word Document with Image

    I have the following issue: My word document contains an embedded image. the text flows around the picture on the right side. After the conversion is the text in a separate paragraph below the picture ... Is it possible to configure the dynamic conve

  • UserCredentialManagerException help me!!

    Hi, I have a problem with SATSA Framework (jsr177). I obtained pkiPath using java.security.cert.CertPath-->getEncoded() in J2SE and I wrote it in "byteEncodedCert.txt" file using FileOutputStream. In my midlet I copied "byteEncodedCert.txt" file and

  • HP 4600n Color Laser Jet

    When powering up the HP 4600n color laser jet printer, it stops at 64mb************* What does this mean

  • XPath processing with namespaces does not work. Please review my code..

    Dear all, I am working on with the IMS Group's Enterprise XML standard (http://www.imsproject.org/enterprise/) and need to retrieve member information using XPath. After significant fault finding, I have narrowed down the problem to the XML file cont

  • Why won't my serial number work?

    I'm trying to set up adobe photshop cs5 extended (student and teacher edition) and my serial number will not work.  It will take the numbers but not the letters so when i try to type it in I'm leaving two serial number boxes open and i can't move on.