No PO line is extracted in XML document

Hi experts,
My client is running their business on R12.
My issue is like this:
Login application and choose PO responsibility, search your purchasing orders and select one PO, then click the 'View Document(s)' option from toolbar. There is no PO line data extracted in the PDF document while actually the selected PO does have lines. And this issue happends to all Purchasing Orders in our system.
We use the original PO document type, XML template and XSD data definition file.
Does anyone have any idea about it? Please help me out. Appreciate your help in advance.

Hi All,
Let me explain the situation a bit more clearly.
The document contains 4 line items. with g/L accounts A, B, C, D .
In F-03, I am entering the document number and G/L account A .
Then when I am trying to clear I get the error, ' No appropriate line item is contained in this document'
I checked in FBL3N. I entered the above document in selection criteria and entered all the 4 G/L accounts.
In the output I can see 2 items. One with G/L account A , with a RED DOT and other with G/L account B
with a TICK Symbol.
There are no clearing documents linked.
So please throw some pointer as to what can be the possible reason of the error and the corresponding
solution.

Similar Messages

  • Extracting XML Document embeded in Envelope

    Hi all
    My problem is how do I extract the XML Document embeded in the Envelope
    Is there a method to do the same
    Since it is present in the cdata section as a string
    How do i reconvert it to a XML document
    I am using jdom
    TIA
    Sanjay

    Sanjay,
    We fixed that now and it's working.
    FIY:
    To extract data from CDATA section with JDOM extact the text of the Element as a String str and change it as InputStream
    InputStream in;
    SAXBuilder builder;
    byte[] bytes = str.getBytes();
    InputStream in = new ByteArrayInputStream(bytes);
    to call then
    Document doc = builder.build(in);
    the new document can now be used to be parsed as usual.
    Cheers
    Seb

  • Large XML document performance

    We are using XDB 9.2.0.4. I am seeing a severe performance degradation when attempting to extract larger XML documents from XDB (somewhere over 3M). Smaller documents appear to be working fine.
    I have been reading in the forum that the problem I am running into is most likely related to the storage model being used. ie) There are several repeating elements within the schema.
    I have added xdb:storeVarrayAsTable="true" statement to the schema and re-registered. I can see, based on user_nested_tables, that XDB appears to be storing the repeating elements as nested tables vs varrays.
    The change to the storage model does not seem to have significantly changed the queries performance.
    The schemas I am using can be found at http://www.sasked.gov.sk.ca/xsd/sl/1.x/SLMessage.xsd & http://www.sasked.gov.sk.ca/xsd/sl/1.x/SDSElements.xsd
    The schema documentation can be found at http://www.sasked.gov.sk.ca/sds/xml/SchemaDocumentation/SLMessage.html
    The element /SL_Message/SL_Event/SL_ObjectData/SL_EventObject is the primary repeating element
    I am using a table with an XMLType column
    CREATE TABLE XML_SL_MESSAGE
    (XML_SL_MESSAGE_ID NUMBER(11) NOT NULL
    ,DTE_TIMESTAMP TIMESTAMP DEFAULT SYSTIMESTAMP NOT NULL
    ,ORIGINAL_XML_SL_MESSAGE_ID NUMBER(11)
    ,VALID_SL_MESSAGE_XML sys.XMLType
    ,INVALID_XML CLOB
    ,ERROR_MESSAGE VARCHAR2(4000)
    ) xmltype column valid_sl_message_xml XMLSCHEMA "http://www.sasked.gov.sk.ca/xsd/sl/1.x/SLMessage.xsd" element "SL_Message"
    The SQL I am using is attempting to bring the XMLType back as a clob, the query seems to be intensive in both CPU and I/O. (looks like it is the getClobVal function)
    select xsm.xml_sl_message_id
    ,xsm.dte_timestamp
    ,nvl(xsm.valid_sl_message_xml.getClobVal(),xsm.invalid_xml) as xml_clob
    ,xsm.error_message
    ,xsm.original_xml_sl_message_id
    from xml_sl_message xsm
    where xsm.dte_timestamp > sysdate –1
    I guess what I am wondering is what are my options ? Changing the storage model ? Applying Indexes ?
    On an unrelated topic, Are there many differences in XDB 9.2.0.5 and 9.2.0.4 ? (I don’t believe 10g will be an option here … yet)
    Thanx in advance
    Trent

    I have applied the 9.2.0.5.0 patches and created the relational table with the following attributes:
    CREATE TABLE XML_SL_MESSAGE
    (XML_SL_MESSAGE_ID NUMBER(11) NOT NULL
    ,DTE_TIMESTAMP TIMESTAMP DEFAULT SYSTIMESTAMP NOT NULL
    ,PSE_SYS_USR_ID NUMBER(11) NOT NULL
    ,ORIGINAL_XML_SL_MESSAGE_ID NUMBER(11)
    ,VALID_SL_MESSAGE_XML sys.XMLType
    ,INVALID_XML CLOB
    ,ERROR_MESSAGE VARCHAR2(4000)
    xmltype column valid_sl_message_xml
    STORE AS OBJECT RELATIONAL
    XMLSCHEMA "http://www.sasked.gov.sk.ca/xsd/sl/1.x/SLMessage.xsd" ELEMENT "SL_Message"
    -- 1:1 ----------------------
    varray valid_sl_message_xml."XMLDATA"."SL_Event"."SL_ObjectData"."SL_EventObject"
    store as table SL_EVENTOBJECT2_TB(
    (constraint SL_EVENTOBJECT2_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    -- 2:2 ----------------------
    varray "SchoolTerm"
    store as table SCHOOLTERM2_TB(
    (constraint SCHOOLTERM2_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    -- 3:2 ----------------------
    varray "SchoolClass"
    store as table SCHOOLCLASS3_TB(
    (constraint SCHOOLCLASS3_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    -- 6:2 ----------------------
    varray "StudentCourseHistory"
    store as table STUDENTCOURSEHISTORY6_TB(
    (constraint STUDENTCOURSEHISTORY6_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    -- 7:2 ----------------------
    varray "StudentSupplementalMark"
    store as table STUDENTSUPPLEMENTALMARK7_TB(
    (constraint STUDENTSUPPLEMENTALMARK7_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    -- 8:2 ----------------------
    varray "StudentClassMark"
    store as table STUDENTCLASSMARK8_TB(
    (constraint STUDENTCLASSMARK8_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    -- 9:2 ----------------------
    varray "StudentExamRegistration"
    store as table STUDENTEXAMREGISTRATION9_TB(
    (constraint STUDENTEXAMREGISTRATION9_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    -- 10:2 ----------------------
    varray "StudentClassEnrollment"
    store as table STUDENTCLASSENROLLMENT10_TB(
    (constraint STUDENTCLASSENROLLMENT10_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    -- 11:2 ----------------------
    varray "StudentPersonal"
    store as table STUDENTPERSONAL11_TB(
    (constraint STUDENTPERSONAL11_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    -- 18:2 ----------------------
    varray "StudentProgramEnrollment"
    store as table STUDENTPROGRAMENROLLMENT18_TB(
    (constraint STUDENTPROGRAMENROLLMENT18_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    -- 19:2 ----------------------
    varray "StudentSchoolEnrollment"
    store as table STUDENTSCHOOLENROLLMENT19_TB(
    (constraint STUDENTSCHOOLENROLLMENT19_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    -- 26:1 ----------------------
    varray valid_sl_message_xml."XMLDATA"."SL_Response"."SL_ObjectData"."SL_EventObject"
    store as table SL_EVENTOBJECT26_TB(
    (constraint SL_EVENTOBJECT26_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    -- 27:2 ----------------------
    varray "SchoolTerm"
    store as table SCHOOLTERM27_TB(
    (constraint SCHOOLTERM27_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    -- 28:2 ----------------------
    varray "SchoolClass"
    store as table SCHOOLCLASS28_TB(
    (constraint SCHOOLCLASS28_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    -- 31:2 ----------------------
    varray "StudentProgramEnrollment"
    store as table STUDENTPROGRAMENROLLMENT31_TB(
    (constraint STUDENTPROGRAMENROLLMENT31_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    -- 32:2 ----------------------
    varray "StudentExamRegistration"
    store as table STUDENTEXAMREGISTRATION32_TB(
    (constraint STUDENTEXAMREGISTRATION32_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    -- 33:2 ----------------------
    varray "StudentClassEnrollment"
    store as table STUDENTCLASSENROLLMENT33_TB(
    (constraint STUDENTCLASSENROLLMENT33_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    -- 34:2 ----------------------
    varray "StudentPersonal"
    store as table STUDENTPERSONAL34_TB(
    (constraint STUDENTPERSONAL34_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    -- 41:2 ----------------------
    varray "StudentSchoolEnrollment"
    store as table STUDENTSCHOOLENROLLMENT41_TB(
    (constraint STUDENTSCHOOLENROLLMENT41_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    -- 48:2 ----------------------
    varray "StudentClassMark"
    store as table STUDENTCLASSMARK48_TB(
    (constraint STUDENTCLASSMARK48_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    -- 49:2 ----------------------
    varray "StudentCourseHistory"
    store as table STUDENTCOURSEHISTORY49_TB(
    (constraint STUDENTCOURSEHISTORY49_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    -- 50:2 ----------------------
    varray "StudentSupplementalMark"
    store as table STUDENTSUPPLEMENTALMARK50_TB(
    (constraint STUDENTSUPPLEMENTALMARK50_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    -- 51:1 ----------------------
    varray valid_sl_message_xml."XMLDATA"."SL_Response"."SL_Ack"."SL_Error"
    store as table SL_ERROR51_TB(
    (constraint SL_ERROR51_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    -- 52:1 ----------------------
    varray valid_sl_message_xml."XMLDATA"."SL_Request"."SL_Query"."SL_QueryObject"
    store as table SL_QUERYOBJECT52_TB(
    (constraint SL_QUERYOBJECT52_PK primary key (NESTED_TABLE_ID,ARRAY_INDEX))
    tablespace data
    ALTER TABLE XML_SL_MESSAGE
    ADD (CONSTRAINT XML_SL_MESSAGE_PK PRIMARY KEY
    (XML_SL_MESSAGE_ID))
    ALTER TABLE XML_SL_MESSAGE
    ADD (CONSTRAINT XMLSLMSG_ORIGINAL_XMLSLMSG_UK UNIQUE
    (ORIGINAL_XML_SL_MESSAGE_ID))
    ALTER TABLE XML_SL_MESSAGE ADD (CONSTRAINT
    XMLSLMSG_SYSUSR_FK FOREIGN KEY
    (PSE_SYS_USR_ID) REFERENCES PSE_SYS_USR
    (PSE_SYS_USR_ID))
    ALTER TABLE XML_SL_MESSAGE ADD (CONSTRAINT
    XMLSLMSG_ORIGINAL_XMLSLMSG_FK FOREIGN KEY
    (ORIGINAL_XML_SL_MESSAGE_ID) REFERENCES XML_SL_MESSAGE
    (XML_SL_MESSAGE_ID))
    -- Create a unique index for the XML Message id
    CREATE UNIQUE INDEX XMLSLMSG_MSGID_UNIQUE ON XML_SL_MESSAGE
    ((substr(extractValue(valid_sl_message_xml,'//SL_MsgId'),1,255)))
    tablespace indx
    COMPUTE STATISTICS
    Here is the nested table structure of the XMLType table created during the schema registration:
    select level
    ,parent_table_column
    from user_nested_tables
    connect by prior table_name = parent_table_name
    start with parent_table_name = 'SL_Message4724_TAB'
    LEVEL PARENT_TABLE_COLUMN
    1 "XMLDATA"."SL_Event"."SL_ObjectData"."SL_EventObject"
    2 SchoolTerm
    2 StudentSchoolEnrollment
    3 "StudentInfo"."Name"
    3 "StudentInfo"."Demographics"."CountryOfCitizenship"
    3 "StudentInfo"."StudentAddress"
    3 "StudentInfo"."PhoneNumber"
    3 "StudentInfo"."Demographics"."Language"
    3 "StudentInfo"."Email"
    2 SchoolClass
    3 "ClassInfo"."DeptAssignedCourseId"
    3 "ClassInfo"."EducatorCertificateNumber"
    2 StudentProgramEnrollment
    2 StudentClassEnrollment
    2 StudentClassMark
    2 StudentCourseHistory
    2 StudentSupplementalMark
    2 StudentExamRegistration
    2 StudentPersonal
    3 "StudentInfo"."Name"
    3 "StudentInfo"."Email"
    3 "StudentInfo"."Demographics"."CountryOfCitizenship"
    3 "StudentInfo"."StudentAddress"
    3 "StudentInfo"."PhoneNumber"
    3 "StudentInfo"."Demographics"."Language"
    1 "XMLDATA"."SL_Request"."SL_Query"."SL_QueryObject"
    1 "XMLDATA"."SL_Response"."SL_ObjectData"."SL_EventObject"
    2 SchoolTerm
    2 SchoolClass
    3 "ClassInfo"."DeptAssignedCourseId"
    3 "ClassInfo"."EducatorCertificateNumber"
    2 StudentProgramEnrollment
    2 StudentClassEnrollment
    2 StudentClassMark
    2 StudentCourseHistory
    2 StudentSupplementalMark
    2 StudentExamRegistration
    2 StudentPersonal
    3 "StudentInfo"."Name"
    3 "StudentInfo"."Email"
    3 "StudentInfo"."Demographics"."Language"
    3 "StudentInfo"."PhoneNumber"
    3 "StudentInfo"."StudentAddress"
    3 "StudentInfo"."Demographics"."CountryOfCitizenship"
    2 StudentSchoolEnrollment
    3 "StudentInfo"."Name"
    3 "StudentInfo"."Demographics"."Language"
    3 "StudentInfo"."PhoneNumber"
    3 "StudentInfo"."StudentAddress"
    3 "StudentInfo"."Demographics"."CountryOfCitizenship"
    3 "StudentInfo"."Email"
    1 "XMLDATA"."SL_Response"."SL_Ack"."SL_Error"
    52 rows selected.
    When I attempt to insert to previously valid XML documents I get a core dump … Here are the insert statements:
    insert into xml_sl_message (
    xml_sl_message_id, dte_timestamp, pse_sys_usr_id, original_xml_sl_message_id, valid_sl_message_xml, invalid_xml,error_message
    select xml_sl_message_id, dte_timestamp, pse_sys_usr_id, original_xml_sl_message_id, xmltype(valid_sl_message_clob), invalid_xml,error_message
    from xml_sl_message_temp where xml_sl_message_id in (5154,5155)
    Here are the details on the exception:
    Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.5.0 - Production
    ORACLE_HOME = /opt/app/oracle/product/9.2.0
    System name: SunOS
    Node name: *****
    Release: 5.8
    Version: Generic_117000-01
    Machine: sun4u
    Instance name: EDDSDS
    Redo thread mounted by this instance: 1
    Oracle process number: 76
    Unix process pid: 11460, image: oracle@***** (TNS V1-V3)
    *** 2004-06-22 09:24:34.603
    *** SESSION ID:(29.159) 2004-06-22 09:24:34.602
    Exception signal: 11 (SIGSEGV), code: 1 (Address not mapped to object), addr: 0x20, PC: [0x101e41830, 0000000101E41830]
    *** 2004-06-22 09:24:34.606
    ksedmp: internal or fatal error
    ORA-07445: exception encountered: core dump [0000000101E41830] [SIGSEGV] [Address not mapped to object] [0x000000020] [] []
    Current SQL statement for this session:
    insert into xml_sl_message (
    xml_sl_message_id, dte_timestamp, pse_sys_usr_id, original_xml_sl_message_id, valid_sl_message_xml, invalid_xml,error_message
    select xml_sl_message_id, dte_timestamp, pse_sys_usr_id, original_xml_sl_message_id, xmltype(valid_sl_message_clob), invalid_xml,error_message
    from xml_sl_message_temp where xml_sl_message_id in (5154,5155)
    I have tried a couple different storage sections (with different levels of nesting) and still the same problem ..
    Is there something wrong with my storage section ?
    What is the "return as LOCATOR" clause for?

  • -error in XML document- when migrating from BPEL 10.1.3.3 to 10.1.3.4

    Hi,
    I've just been handed as set of BPEL processes which were developed in 10.1.3.3 and I'm working on migrating them to 10.1.3.4.
    Migration of most processes was straight forward, however, there is one process (SendMessage) that accepts an XML document as its input. The message payload is successfully sent in the older version, however, in version 10.1.3.4, I keep on getting the following error.
    Server was unable to read request. ---> There is an error in XML document (195, 99). ---> Input string was not in a correct format.
    The line number is the end line number of the xml document message.
    I've checked both versions and in 10.1.3.3 the ValidateXML option is set to false, whereas in 10.1.3.4 its 'none', which is equivalent to false.
    Are there any other settings in 10.1.3.4 that could be causing this error? Has anyone else come across this issue when migrating upgwards from 10.1.3.3?
    I would greatly appreciate any suggestions.
    Kind regards,
    Shiraz

    I had recently done the same migration. One of the issues I had faced was while specifying the nillable elements I used to get an error if the namespace definition was in the header. The error was occuring while sending the message to AQ.
    I do not know if this will help. Also it would be useful if you could provide details of where the process is failing is it failing at the receive activty or later. What does the process do....
    Best of luck with the problem.

  • How to extract the nodes of any given XML document ???

    Hello,
    Greetings! It is an interesting forum.
    A Snippet of XML Schema PurchaseOrder.xsd as given in user guide is as follows
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xdb="http://xmlns.oracle.com/xdb"
    version="1.0" xdb:storeVarrayAsTable="true">
    <xs:element name="PurchaseOrder" type="PurchaseOrderType"
    xdb:defaultTable="PURCHASEORDER"/>
    <xs:complexType name="PurchaseOrderType" xdb:SQLType="PURCHASEORDER_T">
    <xs:sequence>
    <xs:element name="Reference" type="ReferenceType" minOccurs="1"
    xdb:SQLName="REFERENCE"/>
    <xs:element name="Actions" type="ActionsType" xdb:SQLName="ACTIONS"/>
    <xs:element name="Reject" type="RejectionType" minOccurs="0"
    xdb:SQLName="REJECTION"/>
    <xs:element name="Requestor" type="RequestorType"
    xdb:SQLName="REQUESTOR"/>
    <xs:element name="User" type="UserType" minOccurs="1"
    xdb:SQLName="USERID"/>
    <xs:element name="CostCenter" type="CostCenterType"
    xdb:SQLName="COST_CENTER"/>
    <xs:element name="ShippingInstructions" type="ShippingInstructionsType"
    xdb:SQLName="SHIPPING_INSTRUCTIONS"/>
    <xs:element name="SpecialInstructions" type="SpecialInstructionsType"
    xdb:SQLName="SPECIAL_INSTRUCTIONS"/>
    <xs:element name="LineItems" type="LineItemsType"
    xdb:SQLName="LINEITEMS"/>
    </xs:sequence>
    </xs:complexType>
    full schema is available in url
    http://download-west.oracle.com/docs/cd/B12037_01/appdev.101/b10790/xdb03usg.htm#BABBGIED
    The views use XPath expressions and functions such as extractValue() to define the mapping between columns in the view and nodes in the XML document. The following view is created on purchase order schema.
    Creating Relational Views On XML Content
    CREATE OR REPLACE view PURCHASEORDER_MASTER_VIEW
    (REFERENCE, REQUESTOR, USERID, COSTCENTER,
    SHIP_TO_NAME,SHIP_TO_ADDRESS, SHIP_TO_PHONE,
    INSTRUCTIONS)
    AS
    SELECT extractValue(value(p),'/PurchaseOrder/Reference'),
    extractValue(value(p),'/PurchaseOrder/Requestor'),
    extractValue(value(p),'/PurchaseOrder/User'),
    extractValue(value(p),'/PurchaseOrder/CostCenter'),
    extractValue(value(p),'/PurchaseOrder/ShippingInstructions/name'),
    extractValue(value(p),'/PurchaseOrder/ShippingInstructions/address'),
    extractValue(value(p),'/PurchaseOrder/ShippingInstructions/telephone'),
    extractValue(value(p),'/PurchaseOrder/SpecialInstructions')
    FROM PURCHASEORDER p;
    When we register XML Schema in Oracle 9i, the schema elements of XML documents are stored as XMLType, that is, stored using object-relational storage techniques.
    For a small schema, we could build the above view manually, but for large/nested schema, if we have query to build XML documents node list, it will help us to build Relational Views on XML Content.
    How do we extract the nodes of any given XML document through O-R structures or XML DB using XML DB functions?
    Any alternate thoughts are welcome.
    I appreciate your help.
    Regards
    Ram

    Ram
    Once again, I do not think that you can solve the problem you are trying to solve. Fundamentally you need to determine for a given element of a given complex type what are it's child elements. For each of those elements you then need to find out whether or not it in turn has child elements...
    Then you have to think about elements defined as ref rather than type, elements that are substituteable, and the rest of possibilities that can be described with XML Schema.
    If you can solve that problem you're a better man than I as the saying goes. Anyone rather than give you a fish, I'll show you how to at least put a worm on the hook..
    The following query gets the names of the elements inside a each of the global complex types
    Good luck, if you come up with a query to do this I'd love to see it...
    SQL> column COMPLEX_TYPE format A32
    SQL> column ELEMENT format A32
    SQL> --
    SQL> select extractvalue
    2 (
    3 value(ct),
    4 '/xs:complexType/@name',
    5 'xmlns:xs="http://www.w3.org/2001/XMLSchema"'
    6 ) COMPLEX_TYPE,
    7 extractvalue
    8 (
    9 value(et),
    10 '/xs:element/@name',
    11 'xmlns:xs="http://www.w3.org/2001/XMLSchema"'
    12 ) ELEMENT
    13 from resource_view,
    14 table
    15 (
    16 xmlsequence
    17 (
    18 extract
    19 (
    20 res,
    21 '/r:Resource/r:Contents/xs:schema/xs:complexType',
    22 'xmlns:r="http://xmlns.oracle.com/xdb/XDBResource.xsd"
    23 xmlns:xs="http://www.w3.org/2001/XMLSchema"')
    24 )
    25 ) ct,
    26 table
    27 (
    28 xmlsequence
    29 (
    30 extract
    31 (
    32 value(ct),
    33 '/xs:complexType/*/xs:element',
    34 'xmlns:xs="http://www.w3.org/2001/XMLSchema"'
    35 )
    36 )
    37 ) et
    38 where equals_path(res,'/home/SCOTT/poSource/xsd/purchaseOrder.xsd') = 1
    39 /
    COMPLEX_TYPE ELEMENT
    -------------------------------- ------------------------PurchaseOrderType Reference
    PurchaseOrderType Actions
    PurchaseOrderType Reject
    PurchaseOrderType Requestor
    PurchaseOrderType User
    PurchaseOrderType CostCenter
    PurchaseOrderType ShippingInstructions
    PurchaseOrderType SpecialInstructions
    PurchaseOrderType LineItems
    LineItemsType LineItem
    LineItemType Description
    LineItemType Part
    ActionsType Action
    RejectionType User
    RejectionType Date
    RejectionType Comments
    ShippingInstructionsType name
    ShippingInstructionsType address
    ShippingInstructionsType telephone
    19 rows selected.

  • Only one top level element is allowed in an XML document. Line 2, Position 2

    I get this error when I try to run an xsql query with a where clause:
    Only one top level element is allowed in an XML document. Line 2, Position 2
    <font size='-1' face='monospace'>XSQL-005: XSQL page is not well-formed.</font><BR>
    -^
    Here is the xsql query I tried to use.
    <?xml version="1.0"?>
    <xsql:query connection="xmlbook" xmlns:xsql="urn:oracle-xsql">
    select * from companytable where companynumber < 1000;
    </xsql:query>
    null

    You need to escape certain characters in order to make XML documents well formed. The problem in this case is the less than sign between companynumber and 1000. You should replace it with <
    I recommend reading a good XML book - "Building Oracle XML Applications" by Steve Muench, for instance.
    Brian

  • A space in xml-document is stored in database as New line feed instead of n

    Hello,
    I have got the following problem:
    An xml-document is inserted by an xsql servlet into an object view. First this document is translated by an xsl file. Then an instead of trigger inserts the values into the right tables.
    When a space is present (only one space no further string-value) in the xml-document then this space is inserted into the database as a new line feed.(chr(10))
    When I add the following line to the tag
    <bnr_name xml:space="preserve"> </bnr_name>
    then the space is stored as a space. (chr(32))
    What I want is that this space is inserted as a NULL- value.
    Does anyone know a solution in xml or xsl? (Of course I can solve it on the database side by programming a function around it, but I want to solve it on the xml or xsl side)
    Bye
    jan-Paul Duister

    Few questions which might help to understand the issue.
    1. Is client's data is coming in more than 72 chars per each line? Then you can request client to send the data with max. 72 chars per line. Else dividing the string into 72 chars will loose the readability of text since logic can not be built to divide the text.
    Start reading the text string starting from left for maximum 72 chars . If 72th character is non space then go backwards i.e. read 71, 70, 69... till last character should be a SPACE.
    Eg. string is
    'xxxxxxxxxxx...........This material is created for plant xyz. date of creation is 03.02.2009'.
    x = string72(1) should be a SPACE else take x = string71(1)  and likewise.

  • How to extract the actual XML document from soap message?

    My problem is " how to extract the actual XML document from soap message? "
    i just want to extract the attachment i.e. (pure XML document without any soap header or envolope).
    i could be ver thank full if u could solve my problem.
    [email protected]

    Hi,
    This is some skeleton code for extracting an attachment from a SOAPMessage.
    import javax.activation.DataHandler.;
    import javax.xml.soap.*;
    import javax.xml.message.*;
    Iterator allAttachments = message.getAttachments();
    AttachmentPart ap1 = null;
    while(allAttachments.hasNext()){
    ap1 = (AttachmentPart)allAttachments.next();
    //Check that the attachment is correct one. By looking at its mime headers
    //Convert the attachment part into its DOM representation:
    if(ap1.getContentType() == "text/xml"){
    //Use the activation dataHandler class to extract the content, then create a StreamSource from
    //the content.
    DataHandler attachmentContent = ap1.getDataHandler();
    StreamSource attachmentStream = new StreamSource(attachmentContent.getInputStream());
    DOMResult domAttachment = getDOMResult(attachmentStream);
    domAttachment holds an xml representation of the attachment.
    Hope this helps.

  • XML Document to String - Line Separator problem

    I�m facing a problem with line separator while converting a Document object to String.
    Scenario: I get an input XML having line separator say \n (hex: 0A).
    When I create the output XML using Transformer, the line separator is still \n.
    I have a requirement which makes me convert the transformed Stream into a Document.
    When I try to get the String/bytes from the Document, my line separator is now �\r\n�(hex 0D0A), which is my system�s System property �line-separator�.
    I want to keep the line separator same as that was in input string. So, if the input has the separator has \n, output should have the separator as �\n� and if the input has it as �\r\n�, output should have the same.
    i.e. my hex output should match the hex input.
    Any pointers in the direction are welcome.
    Thanks in advance.

    Can I infer that the parser has changed my document
    line separators when I load it into a Document?
    If yes, is there a way to prevent that from
    happening?I don't really know. Since the XML recommendation says that a parser "MUST" do line-break normalization, I would expect that it does. And I wouldn't design systems that use specific non-XML-approved line endings as a feature, either.

  • Carriage Returns & Line Feeds in XML documents

    Does anyone know why the PL/SQL XML parser will NOT work with Carriage Returns (0x0D) within the XML document?
    Currently I'm having to strip them out, leaving just the Line Feed (0x0A).
    I only realised this after looking at the family.xml example document.
    T.I.A.
    Geoff

    I forgot to mention that I'm running Oracle 8i on Windows NT.

  • Getting line number of  XML document

    Hi all,
    Can someone please help me in 'how to get the line number of XML document'. I know when it throws SAXParseException it give the line number. I want to get the line number when it parses the document successfully. I know i need to use setDocumentLocator and then implement the Locator.
    can someone give me a chunk of code for it.
    thx in advance,
    -Soni

    Hi,
    Atlast i got the solution. It goes like this..
    class A {
    Location loc;
    public void setDocumentLocator(Locator l) {
    loc = l;
    //Here goes other methods like startElement, endElement etc.
    public void someMethod() {
    loc.getLineNumber(); //u can do this anywhere inside the class
    -Soni

  • Extracting and Loading XML document

    We need to extract and load an XML document into the database
    For e.g.
    <ROW> <EMP_ID>1</EMP_ID> <EMP_NAME>SSK</EMP_NAME>
    <RESUME> Resume of sssk
    </RESUME>
    </ROW>
    We need to load emp_id, emp_name to emp_id, emp_name field in the database and <RESUME> field to a CLOB.
    The table is as follows
    EMP_ID NUMBER
    EMP_NAME VARCHAR2(100)
    RESUME CLOB
    How exactly is this done using the XSU utility? Does it support loading of <RESUME> data in this case to a CLOB.
    Where could I find examples of doing this.
    null

    The "first child" of most of your elements is a white-space node containing a newline character. Your code incorrectly assumes it is an element node.

  • XMLType.extract and namespace in XML document

    I found some strange behaviour of XMLType:
    I create table by means of:
    create table conf (id varchar2(10), info sys.xmltype);
    I insert xml document into table.
    The text of xml document is:
    <conference finishPage="/regfinish_en.jsp" id="CID003" xmlns="http://stud.aanet.ru/conf">
    <conferencetitle>title1 </conferencetitle>
    </conference>
    Then I execute:
    select a.info.extract('//conferencetitle/text()').getstringval() from conf a
    result is empty string.
    I replace document with
    <conference finishPage="/regfinish_en.jsp" id="CID003" >
    <conferencetitle>title1 </conferencetitle>
    </conference>
    Now result of statement
    select a.info.extract('//conferencetitle/text()').getstringval() from conf a
    is "title1"
    But than I replace document with
    <tc:conference finishPage="/regfinish_en.jsp" id="CID003" xmlns:tc="http://stud.aanet.ru/conf">
    <tc:conferencetitle>title1 </tc:conferencetitle>
    </tc:conference>
    and execute
    select a.info.extract('//tc:conferencetitle/text()').getstringval() from conf a
    or
    select a.info.extract('//t:conferencetitle/text()').getstringval() from conf a
    The result is "title1"
    I receive this result on Oracle for Linux 9.0.1.3.

    hi, before you set the attribute, you need to create a Namespace element preliminary.
    Try the following code:
    ELEMENT = DOCUMENT->CREATE_SIMPLE_ELEMENT_NS(
    NAME = 'abap'
    PREFIX = 'asx'
    PARENT = DOCUMENT ).
    ATTRIBUTE = DOCUMENT->create_namespace_decl(
    NAME = 'XMLNS'
    PREFIX = 'asx'
    URI = 'http://www.sap.com/abapxml').
    ELEMENT->SET_ATTRIBUTE_NODE_NS(
    NEW_ATTR = ATTRIBUTE).
    Hope my reply will be useful.
    thanks

  • Extracting Values from XML-Document in pl/sql

    Hello!
    I need to extract the content of the following extract:
    <ns1:OXERPGetArticlesResponse xmlns:ns1="OXERPService">
    <ns1:OXERPGetArticlesResult>
    <ns1:OXERPType>
    <ns1:aResult>
    <ns1:ArrayOfString>
    <ns1:string>OXID</ns1:string>
    <ns1:string>531f91d4ab8bfb24c4d04e473d246d0b</ns1:string>
    </ns1:ArrayOfString>
    <ns1:ArrayOfString>
    <ns1:string>OXARTNUM</ns1:string>
    <ns1:string>0601-85-069</ns1:string>
    </ns1:ArrayOfString>
    <ns1:ArrayOfString>
    <ns1:string>OXPRICE</ns1:string>
    <ns1:string>100.5</ns1:string>
    </ns1:ArrayOfString>
    </ns1:aResult>
    <ns1:blResult>true</ns1:blResult>
    <ns1:sMessage/>
    </ns1:OXERPType>
    <ns1:OXERPType>
    <ns1:aResult>
    <ns1:ArrayOfString>
    <ns1:string>OXID</ns1:string>
    <ns1:string>531a8af7d9a9a5bb53b65a2b9a5356e5</ns1:string>
    </ns1:ArrayOfString>
    <ns1:ArrayOfString>
    <ns1:string>OXARTNUM</ns1:string>
    <ns1:string>0601-85-069-1</ns1:string>
    </ns1:ArrayOfString>
    <ns1:ArrayOfString>
    <ns1:string>OXPRICE</ns1:string>
    <ns1:string>89.9</ns1:string>
    </ns1:ArrayOfString>
    </ns1:aResult>
    <ns1:blResult>true</ns1:blResult>
    <ns1:sMessage/>
    </ns1:OXERPType>
    </ns1:OXERPGetArticlesResult>
    </ns1:OXERPGetArticlesResponse>
    The output should be:
    OXID OXARTNUM OXPRICE
    531f91d4ab8bfb24c4d04e473d246d0b 0601-85-069 100.5
    531a8af7d9a9a5bb53b65a2b9a5356e5 0601-85-069-1 89.9
    The count of rows and columns is variable.
    I want to do this by using xmltype.extract but I found no way to create a loop over the content of the xml document.
    Hopefully someone can help me!
    Regards
    Herbert

    OK, then you should be able to use something like :
    SQL> var xmldoc clob;
    SQL> begin
      2   :xmldoc := '<ns1:OXERPGetArticlesResponse xmlns:ns1="OXERPService">
      3  <ns1:OXERPGetArticlesResult>
      4  <ns1:OXERPType>
      5  <ns1:aResult>
      6  <ns1:ArrayOfString>
      7  <ns1:string>OXID</ns1:string>
      8  <ns1:string>531f91d4ab8bfb24c4d04e473d246d0b</ns1:string>
      9  </ns1:ArrayOfString>
    10  <ns1:ArrayOfString>
    11  <ns1:string>OXARTNUM</ns1:string>
    12  <ns1:string>0601-85-069</ns1:string>
    13  </ns1:ArrayOfString>
    14  <ns1:ArrayOfString>
    15  <ns1:string>OXPRICE</ns1:string>
    16  <ns1:string>100.5</ns1:string>
    17  </ns1:ArrayOfString>
    18  </ns1:aResult>
    19  <ns1:blResult>true</ns1:blResult>
    20  <ns1:sMessage/>
    21  </ns1:OXERPType>
    22  <ns1:OXERPType>
    23  <ns1:aResult>
    24  <ns1:ArrayOfString>
    25  <ns1:string>OXID</ns1:string>
    26  <ns1:string>531a8af7d9a9a5bb53b65a2b9a5356e5</ns1:string>
    27  </ns1:ArrayOfString>
    28  <ns1:ArrayOfString>
    29  <ns1:string>OXARTNUM</ns1:string>
    30  <ns1:string>0601-85-069-1</ns1:string>
    31  </ns1:ArrayOfString>
    32  <ns1:ArrayOfString>
    33  <ns1:string>OXPRICE</ns1:string>
    34  <ns1:string>89.9</ns1:string>
    35  </ns1:ArrayOfString>
    36  </ns1:aResult>
    37  <ns1:blResult>true</ns1:blResult>
    38  <ns1:sMessage/>
    39  </ns1:OXERPType>
    40  </ns1:OXERPGetArticlesResult>
    41  </ns1:OXERPGetArticlesResponse>';
    42  end;
    43  /
    Procédure PL/SQL terminée avec succès.
    SQL> SELECT x1.rec_id
      2       , x2.col_name
      3       , x2.col_value
      4  FROM XMLTable(
      5        XMLNamespaces('OXERPService' as "ns1"),
      6        '/ns1:OXERPGetArticlesResponse/ns1:OXERPGetArticlesResult/ns1:OXERPType/ns1:aResult'
      7        passing xmltype(:xmldoc)
      8        columns rec_id for ordinality
      9              , rec_xml xmltype path 'ns1:ArrayOfString'
    10       ) x1,
    11       XMLTable(
    12        XMLNamespaces('OXERPService' as "ns1"),'/ns1:ArrayOfString'
    13        passing x1.rec_xml
    14        columns col_name  varchar2(30) path 'ns1:string[1]'
    15              , col_value varchar2(30) path 'ns1:string[2]'
    16       ) x2
    17  ;
        REC_ID COL_NAME                       COL_VALUE
             1 OXID                           531f91d4ab8bfb24c4d04e473d246d
             1 OXARTNUM                       0601-85-069
             1 OXPRICE                        100.5
             2 OXID                           531a8af7d9a9a5bb53b65a2b9a5356
             2 OXARTNUM                       0601-85-069-1
             2 OXPRICE                        89.9
    6 ligne(s) sélectionnée(s).You mentioned that the number of column(s) is not known in advance. That's gonna be a problem to present the data column-wise.
    Version 11g has the PIVOT feature, but still you have to know how many columns there will be in the result set.
    How are you going to use the data after extraction?
    Maybe we could advise some other techniques more relevant for your requirement.

  • Remove first line in the XML Document

    Hi Friends,
    In my File to File scenario when ever new mesg is appending to file at receiver side,it should remove <?xml version="1.0" encoding="ISO-8859-1"?>  tag from the XML Document.This means <?xml version="1.0" encoding="ISO-8859-1"?> tag should appear once in a document.Plz suggest me to do this.
    Thanks
    pullarao.

    Hi there,
    you can either use XSLT (with output type="text") or Java, using the code:
    try {
      DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
      DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
      Document doc = docBuilder.parse(in);
      TransformerFactory tf = TransformerFactory.newInstance();
      Transformer trans = tf.newTransformer();
      trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
      DOMSource source = new DOMSource(doc);
      OutputStream out = new ByteArrayOutputStream();
      trans.transform(source, new StreamResult(out));
    } catch (...
    But as Bhavesh said, append mode is not recommended for XML files.
    Best approach is collect pattern on BPM.
    Regards,
    Henrique.

Maybe you are looking for