XPath Query

Hi All,
How to use Xpath query . I need a example of Xpath query activity in CPO.

XPATH query is a pretty standard XML/web query language. You can review it in general @ http://www.w3schools.com/xpath/xpath_syntax.asp
For CPO examples, I suggest you go check out the design center and/or my blog (which is public to all).
The blog is called Pondering Automation and is @ https://supportforums.cisco.com/community/5811/intelligent-automation
I do a ton of web service work with JSON, XML, Xpath queries , etc.
Also here if you are more specific with your use-case about what you are doing it might be more easy for us to help and everyone to benefit from it.

Similar Messages

  • Copying Variables in BPEL using XPath Query

    Hi,
    I am new to BPEL and i want to know if it is possible to copy data from one variable to another using XPath Query in the <from> <to> tags, when the two variables are of different message types.
    I am trying to create a sample BPEL that would receive a String through the receive tag tied to one partner link (WSDl) and then invoke a different webservice using the <invoke> tag tied to another partner link (WSDL) by passing the received variable.
    I have pasted the BPEL File and the two WSDl files involved.
    My Issue is that when I send a soap request to the BPEL, it is passed as null to the webservice invoked.
    Probably because the copy tags don't work.
    Please help.
    BPEL File
    <!--
    ~ Licensed to the Apache Software Foundation (ASF) under one
    ~ or more contributor license agreements. See the NOTICE file
    ~ distributed with this work for additional information
    ~ regarding copyright ownership. The ASF licenses this file
    ~ to you under the Apache License, Version 2.0 (the
    ~ "License"); you may not use this file except in compliance
    ~ with the License. You may obtain a copy of the License at
    ~
    ~ http://www.apache.org/licenses/LICENSE-2.0
    ~
    ~ Unless required by applicable law or agreed to in writing,
    ~ software distributed under the License is distributed on an
    ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    ~ KIND, either express or implied. See the License for the
    ~ specific language governing permissions and limitations
    ~ under the License.
    -->
    <process name="HelloWorld2"
    targetNamespace="http://ode/bpel/unit-test"
    xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:tns="http://ode/bpel/unit-test"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:test="http://ode/bpel/unit-test.wsdl"
    xmlns:ns0="http://poc.com"
    queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
    expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
    <import location="HelloWorld2.wsdl"
    namespace="http://ode/bpel/unit-test.wsdl"
    importType="http://schemas.xmlsoap.org/wsdl/" />
    <import location="sayHello.wsdl"
    namespace="http://poc.com"
    importType="http://schemas.xmlsoap.org/wsdl/" />
    <partnerLinks>
    <partnerLink name="helloPartnerLink"
    partnerLinkType="test:HelloPartnerLinkType"
    myRole="me" />
    <partnerLink name="sayHelloBPELPL"
    partnerLinkType="ns0:sayHelloPLT"
    partnerRole="you" initializePartnerRole="yes" />
    </partnerLinks>
    <variables>
    <variable name="myVar" messageType="test:HelloMessage"/>
    <variable name="tmpVar" messageType="test:HelloMessage"/>
    <variable name="inVar" messageType="ns0:sayHelloRequest"/>
    <variable name="outVar" messageType="ns0:sayHelloResponse"/>
    </variables>
    <sequence>
    <receive
    name="start"
    partnerLink="helloPartnerLink"
    portType="test:HelloPortType"
    operation="hello"
    variable="myVar"
    createInstance="yes"/>
    <assign name="ass1">
    <copy>
    <from variable = "myVar" part = "TestPart"/>
    <to variable = "inVar"
    part = "parameters"
    query= "/sayHello/ns0:param0" />
    </copy>
    </assign>
    <invoke partnerLink = "sayHelloBPELPL"
    portType = "ns0:sayHelloPortType"
    inputVariable = "inVar"
    operation = "sayHello"
    outputVariable = "outVar">
    </invoke>
    <assign name="ass2">
    <copy>
    <from variable = "outVar"
    part = "parameters"
    query= "/sayHelloResponse/ns0:return" />
    <to variable = "tmpVar" part="TestPart"/>
    </copy>
    </assign>
    <reply name="end"
    partnerLink="helloPartnerLink"
    portType="test:HelloPortType"
    operation="hello"
    variable="tmpVar"/>
    </sequence>
    </process>
    WSDL File1
    <?xml version="1.0" encoding="utf-8" ?>
    <!--
    ~ Licensed to the Apache Software Foundation (ASF) under one
    ~ or more contributor license agreements. See the NOTICE file
    ~ distributed with this work for additional information
    ~ regarding copyright ownership. The ASF licenses this file
    ~ to you under the Apache License, Version 2.0 (the
    ~ "License"); you may not use this file except in compliance
    ~ with the License. You may obtain a copy of the License at
    ~
    ~ http://www.apache.org/licenses/LICENSE-2.0
    ~
    ~ Unless required by applicable law or agreed to in writing,
    ~ software distributed under the License is distributed on an
    ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    ~ KIND, either express or implied. See the License for the
    ~ specific language governing permissions and limitations
    ~ under the License.
    -->
    <wsdl:definitions
    targetNamespace="http://ode/bpel/unit-test.wsdl"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://ode/bpel/unit-test.wsdl"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
    xmlns:ns0="http://poc.com">
    <wsdl:message name="HelloMessage">
    <wsdl:part name="TestPart" type="xsd:string"/>
    </wsdl:message>
    <wsdl:portType name="HelloPortType">
    <wsdl:operation name="hello">
    <wsdl:input message="tns:HelloMessage" name="TestIn"/>
    <wsdl:output message="tns:HelloMessage" name="TestOut"/>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="hello">
    <soap:operation soapAction="" style="rpc"/>
    <wsdl:input>
    <soap:body
    namespace="http://ode/bpel/unit-test.wsdl"
    use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body
    namespace="http://ode/bpel/unit-test.wsdl"
    use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="HelloService">
    <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
    <soap:address location="http://localhost:8082/ode/processes/helloWorld"/>
    </wsdl:port>
    </wsdl:service>
    <plnk:partnerLinkType name="HelloPartnerLinkType">
    <plnk:role name="me" portType="tns:HelloPortType"/>
    <plnk:role name="you" portType="tns:HelloPortType"/>
    </plnk:partnerLinkType>
    </wsdl:definitions>
    WSDL File 2
    <?xml version="1.0" encoding="UTF-8" ?>
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:ns0="http://poc.com"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:ns1="http://org.apache.axis2/xsd"
    xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
    targetNamespace="http://poc.com">
    <wsdl:types>
    <xs:schema xmlns:ns="http://poc.com" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://poc.com">
    <xs:element name="sayHello">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="param0" nillable="true" type="xs:string" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="sayHelloResponse">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="return" nillable="true" type="xs:string" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    </wsdl:types>
    <wsdl:message name="sayHelloRequest">
    <wsdl:part name="parameters" element="ns0:sayHello" />
    </wsdl:message>
    <wsdl:message name="sayHelloResponse">
    <wsdl:part name="parameters" element="ns0:sayHelloResponse" />
    </wsdl:message>
    <wsdl:portType name="sayHelloPortType">
    <wsdl:operation name="sayHello">
    <wsdl:input message="ns0:sayHelloRequest" wsaw:Action="urn:sayHello" />
    <wsdl:output message="ns0:sayHelloResponse" wsaw:Action="urn:sayHelloResponse" />
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="sayHelloSOAP11Binding" type="ns0:sayHelloPortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="sayHello">
    <soap:operation soapAction="urn:sayHello" style="document"/>
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="sayHello">
    <wsdl:port name="sayHelloPort" binding="ns0:sayHelloSOAP11Binding">
    <soap:address location="http://localhost:8082/ode/processes/sayHello" />
    </wsdl:port>
    </wsdl:service>
    <plnk:partnerLinkType name="sayHelloPLT">
    <plnk:role name="me" portType="ns0:sayHelloPortType"/>
    <plnk:role name="you" portType="ns0:sayHelloPortType"/>
    </plnk:partnerLinkType>
    </wsdl:definitions>

    Hi,
    Yes, it very much is possible.
    Xpath query provides a lot many data type conversion functions(string to int, string to date etc), which can be used in copying variables.
    thanks
    Saurabh

  • Retrieve xml attribute value of nth xml node using xpath query

    I have an xml with following stucture...
    <xml>
    <header>
     <DocumentReference OrderId="order001">
     <DocumentReference OrderId="order002">
     <DocumentReference OrderId="order003">
    I have to loop through this xml and retrieve the orderId values inside Biztalk orchestration.
    In the expression shape, I get the count of 'DocumentReference' nodes using an xpath query and then
    Added a loopshape to make sure it loops thru all nodes
    Loop condition:   n<=nodeCount     (where n is an integer variable, n=0 to begin with, incremented by 1 thru each loop, nodeCount is # of DocumentReference nodes)
     I try retrieve to the orderId in the following expression shape using the below xpath query
      xpathQuery = System.String.Format("//*[local-name()='OrderReference'][{0}]/@orderID)",n);
      sOrderId = xpath(MsgSingleInvoice,xpathQuery);
    And I get the following exception:
    Inner exception: '//*[local-name()='OrderReference'][1]/@orderID)' has an invalid token.
    Exception type: XPathException
    Appreciate any help!   thanks!

    Thanks for the quick response. I got rid of it.
    And I see a different error:
    Inner exception: Specified cast is not valid. Exception type: InvalidCastException
    Source: Microsoft.XLANGs.Engine  
    Target Site: System.Object XPathLoad(Microsoft.XLANGs.Core.Part, System.String, System.Type)
    Since variable 'n' is of integer type, I suspected it and changed it to n.ToString() and tested again and still see the same error.

  • Variable Picker generates invalid XPath query

    This one seems to be a bug:
    When declaring a variable of type "element" (not "messageType") and accessing the variable with the Variable Picker from within the assign assistant, i.e. the following line ist generated:
    bpws:getVariableData("testVar","","/tns:TaskMgrTestCaseRequest/tns:input")
    The BPEL process can be validated and deployed without an error.
    At runtime the following exception is generated:
    XPath expression failed to execute.
    Error while processing xpath expression, the expression is "bpws:getVariableData("testVar", "", "/tns:TaskMgrTestCaseRequest/tns:input")", the reason is XPath expression failed to execute.
    Error while processing xpath expression, the expression is "", the reason is Unexpected ''.
    Please verify the xpath query.
    Please verify the xpath query.
    When working with variables of type messageType, there is no problem. (So I declared a messageType to each element type ...)
    Wolfgang

    Thanks for the heads up. We will try to kill this bug in the 0.97 release. -Edwin

  • XPath Query Language Reference

    Aside from the three little examples given in the 11g Guide and the B2B Tech Note #011, is there a reference available for the XPath Query Language used by B2B? Is is possible to use complex XPath queries in the B2B Doc Definitions?

    I'm mainly just looking for the full capabilities of the queries.
    Specifically, at the moment, I'm looking for a way to match the value of a node to a group of values (like a sql 'in') as well as check the existence and value of other nodes within the same query.
    Do the documents I find for 'Preference XPath' pertain here?

  • Xpath query on initiateTaskResponse variable fails

    I have a small BPEL process which has a human task , in that when I try to access taskid from initiateTaskResponse message, it throws xpath query is invalid error.
    Thanks

    Thanks for your Reply,
    I can able to browse the variable in JDeveloper at design time. When I try to deploy the process, the server throws error on that assign activity(Selection Failure). So I have changed the assign activity to JavaEmbeeding, but now it throws 'Selection Failure' error at runtime.
    I can able to use anyother variables in assign activity.
    Thanks in advance,
    Murugavel Mahadevan

  • XPath query on a CLOB?

    Does anyone know if there is an easy way to run an XPath query against a CLOB column? I know it's simple if the column is XMLType, but what if it's a CLOB?

    Does CLOB store XML? If so, simply use XMLTYPE(clob_column).
    SY.

  • Correct wat to determine if the XPath Query resulted in a match

    What is the correct way to determine of the XPath Query
    (using e4x syntax) returned matching nodes?
    The result is never a null reference even if there are no
    matches found, and I can't seem to find a way to determine if the
    XMLList returned has any nodes except for a convoluted way like so:
    var matchingRecords:XMLList =
    xmlData.dataTable[0].dataRow.(@someAttribute == someVariable);
    var record:XML = matchingRecords[0]; //This is the part I
    don't like to have to do.
    if (record == null)
    //This means no matches were found.
    else
    //This means atleast one match was found.

    "...they feel they've done it all too perfectly ..."
    I've been working with Flex since it was beta, and I must
    disagree with this. In my experience, the Adobe/MM folks are paying
    very close attention to what we say.
    You need to understand that you do not modify/release
    commercial software casually. It will take months to years. Be
    patient, or find a workaround, they exist.
    Be sure to log your wishes/bugs on the wishform. I know for a
    fact that they monitor that. I have been contacted for
    clarifications on my posts there.
    http://www.macromedia.com/support/email/wishform/
    Tracy

  • Xpath query return problem

    Hi;
    I want to load xml file into the database oracle 9.0.2 using Oracle XML DB Utilities Package on "http://otn.oracle.com/sample_code/tech/xml/xmldb/xdbutilities/XMLDB_Utilities_Overview.htm"
    I have a schema like:
    <xs:element name="catalog">
    <xs:element name="catalog">
    <xs:complexType xdb:SQLType="OBJ_CATALOG">
    <xs:sequence>
    <xs:element name="category">
    <xs:complexType xdb:SQLType="OBJ_CATEGORY">
    <xs:sequence>
    <xs:element name="product">
    <xs:complexType xdb:SQLType="OBJ_PRODUCT">
    <xs:sequence>
    <xs:element name="name" type="xs:string"/>           
    and my file include:
    [i]<catalog>
    <category name="books">
    <product id="1" keywords="yasanti, Latin Amerika" >
    <name>Gunes Topraklari</name>
    </product>
    </category>
    <category name="CDs" >
    <product id="5" keywords="music, easy listening" >
    </product>
    </category>
    I can use xpath query like
    select extract(value(x), '/catalog/category[@name="books"]').getstringval() from product_table x
    and get result but I can not take any data about product elements with queries such that
    select extract(value(x), '/catalog/category[@name="books"]//name/text()').getstringval() from product_table x
    Does anyone has an idea about this problem?
    Thanks a lot.
    Alper.

    Please post this message at:
    Forums Home » Oracle Technology Network (OTN) » Products » Database » XML DB

  • XPath Query Solved

    JDev Team,
    Is there a way to execute XPath Query on an XML document? In version 10.1.3 there was a extension through to achieve this. Do we have anything similar in TP4? If not, can we expect something for the production release? Please let me know.
    Thanks
    Bala.

    Please ignore my previous post. I found the option under the search menu.
    Thanks

  • XPath query against XMLType

    Hello,
    I am trying to reproduce the following XPath query using XDB functionality against a XMLType column:
    //AtomicPart[@MyID='190' or @MyID='495' or @MyID='1662']
    If I do the following I do get all AtomicParts:
    select X.xml.extract('//AtomicPart') FROM TEST X
    But I havent figured out how to do the or operation. Is it possible or does it require views?
    Thank you,
    Robert

    Robert
    Need to see the instance document in order to answer this..

  • Xpath query depenedent on new line chars

    Hi,
    I am trying to run an XPath query against a String which contains the XML. I am using Apache Commons IOUtils
    to convert String to InputStream
    If the String contains new line chars in it then I get unexpected results. However if XML is one looong string then there
    is no problem.
    What can I do to avoid this problem.
         public static void main(String[] args)
                   throws XPathFactoryConfigurationException,
                   XPathExpressionException, ParserConfigurationException,
                   SAXException, IOException {
              // System.out.println(XML);
              XPathFactory xpathFactory = XPathFactory
                        .newInstance(XPathFactory.DEFAULT_OBJECT_MODEL_URI);
              XPath xpath = xpathFactory.newXPath();
              DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance()
                        .newDocumentBuilder();
                    // Use XML_STRING as the xml to reproduce the error
              Document document = documentBuilder.parse(IOUtils.toInputStream(XML_STRING));
              NodeList xpathResult = (NodeList) xpath.evaluate("/Envelope/Body",
                        document, XPathConstants.NODESET);
              Node node = xpathResult.item(0).getFirstChild();
              String requestName = node.getNodeName();
              requestName = requestName.split(":",-1)[1];
              System.out.println(requestName);
              String sessionIdXqry = "/Envelope/Body/" + requestName + "/sessionId";
              System.out.println(sessionIdXqry);
              String sessionId = (String)xpath.evaluate(sessionIdXqry, document, XPathConstants.STRING);
              System.out.println("SessionID = " + sessionId);
         }

    You can't call methods in EL like that - write a custom tag that transforms the data in the way you want (replacing newlines with "<br>"). Then:
    <something:yourNewTag text="${row.description}" />

  • XPath query rewrite and insertChildXML (10g2): Help?

    Hi all,
    I have a registered schema for a <log> document. The schema defines an element /log/logData and under that there, /log/logData/data having maxOccurs="unbounded". So the form of documents is
    <log>
    <logData>
    <data>a</data>
    <data>b</data>
    <data>c</data>
    </logData>
    </log>
    In the schema definition I have enabled "storeArrayAsVArray='true'". The <data> elements are stored in a nested table. Every type is stored object-relationally.
    To an instance documen, I add <data> elements so:
    UPDATE log SET object_value = insertChildXML(object_value, 'log/logData', 'data', '<data>foo</data>') WHERE existsNode ('/log[@uid="foo"]')
    The call succeeds but the problem is that I need to make this call thousands of times. Initiallly the call might take 100 ms, but after a few hundred inserts inserting a single element takes over a second, and the time keeps increasing.
    I believe at least part of the problem is that XPath query rewrites are not working for this call.
    Following Chapter 6 of Oracle XML DB Developer's Guide, to debug the problem I have switched on
    ALTER SESSION SET EVENTS '19021 trace name context forever, level 1';
    and then every invocation causes:
    ORA-19022: XML XPath functions are disabled
    indicating that Oracle could not rewrite the query. Then I set
    ALTER SESSION SET EVENTS '19027 TRACE NAME CONTEXT FOREVER, LEVEL 8192'
    to obtain a trace file. Here is a portion of that trace:
    *** 2005-10-30 16:54:44.984
    *** ACTION NAME:() 2005-10-30 16:54:44.968
    *** MODULE NAME:(SQL*Plus) 2005-10-30 16:54:44.968
    *** SERVICE NAME:(SYS$USERS) 2005-10-30 16:54:44.968
    *** SESSION ID:(137.38364) 2005-10-30 16:54:44.968
    NO REWRITE
         Reason ==> xseq:not optuop
    NO REWRITE
         Reason ==> xseq:not optuop
    NO REWRITE
         Reason ==> not SQLX operand
    NO REWRITE
         Reason ==> non sqlx expression input
    NO REWRITE
         Reason ==> non rewritable sqlx input
    NO REWRITE
    (the rest of the file repeats these lines)
    I have no idea how to interpet that! Can anyone out there offer some insight/assistance?
    Thanks if you can,
    Hugh

    Below is a complete example script. Cannot seem to get rewrite for even this simple case. By that I mean, executing both of the SELECT statements near the end yield the ORA-19022, and that executing the insertChildXML takes progressively longer to execute the more child elements there are.
    Any pointers appreciated!
    Hugh
    set echo on
    ALTER SESSION SET EVENTS '19021 trace name context forever, level 1';
    ALTER SESSION SET EVENTS '19027 TRACE NAME CONTEXT FOREVER, LEVEL 8192';
    exec dbms_xmlschema.deleteSchema('http://hughw.net/foo', dbms_xmlschema.DELETE_CASCADE_FORCE);
    begin
    dbms_xmlschema.registerSchema('http://hughw.net/foo', XMLType('<?xml version="1.0" encoding="UTF-8"?>
    <xs:schema targetNamespace="http://hughw.net/foo" xmlns="http://hughw.net/foo" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"
    xmlns:xdb="http://xmlns.oracle.com/xdb" xdb:storeVarrayAsTable="true">
    <xs:element name="root" xdb:defaultTable="ROOT" >
    <xs:complexType xdb:SQLType="ROOT_T">
    <xs:sequence>
    <!-- could use out of line storage -->
    <!-- commented out
    <xs:element name="child" type="childType" minOccurs="0" maxOccurs="unbounded"
    xdb:SQLName="CHILDREN"
    xdb:SQLInline="false" xdb:defaultTable="CHILD"
    />
    -->
    <!-- use nested table -->
    <xs:element name="child" type="childType" minOccurs="0" maxOccurs="unbounded"
    xdb:SQLName="CHILDREN"
    xdb:SQLCollType="CHILD_V"
    />
    </xs:sequence>
    <xs:attribute name="uid" type="xs:string" use="required"/>
    </xs:complexType>
    </xs:element>
    <xs:complexType name="childType" xdb:SQLType="CHILD_T">
    <xs:simpleContent>
    <xs:extension base="xs:string"/>
    </xs:simpleContent>
    </xs:complexType>
    </xs:schema>'));
    end;
    insert into root values( XMLType('<?xml version="1.0" encoding="UTF-8"?>
    <root uid="1" xmlns="http://hughw.net/foo"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://hughw.net/foo http://hughw.net/foo">
    <child>a</child>
    <child>b</child>
    <child>c</child>
    </root>'));
    CREATE INDEX ROOT_INDEX ON ROOT (extractValue(object_value,'/root/@uid'));
    select insertChildXML(object_value, '/root', 'child', '<child>x</child>>') FROM root;
    explain plan for select insertChildXML(object_value, '/root', 'child', '<child>x</child>>') FROM root;
    SELECT PLAN_TABLE_OUTPUT FROM table(DBMS_XPLAN.display('plan_table', NULL, 'serial'));
    select insertChildXML(object_value, '/root', 'child', '<child>x</child>>') FROM root
    WHERE existsNode(object_value, '/root[@uid="1"]') = 1;
    explain plan for select insertChildXML(object_value, '/root', 'child', '<child>x</child>>') FROM root
    WHERE existsNode(object_value, '/root[@uid="1"]') = 1;
    SELECT PLAN_TABLE_OUTPUT FROM table(DBMS_XPLAN.display('plan_table', NULL, 'serial'));

  • XPath query must be an absolute path in BPEL2.0 or only BPEL4WS?

    Hi,
    The 1st version of the BPEL4WS specifies that "For XPath 1.0, the value of the query attribute MUST be an absolute locationPath (with '/' meaning the root of the document fragment representing the entire part)." (under 14.3)
    But in BPEL 2.0 I cannot find this rule. I wonder if it is different in this version. Especially, can people write something like this:
    //street[@name='blabla']
    in the xPath query of an assign activity? or are there any important restrictions on using xPath query for a copy selection?
    Please help
    Thank you very much

    Ok, I've realised i mixed up my partitions. sda1 is with windows, sda3 is the extended one. So i changed rootnoverify(hd0,2) to rootnoverify(hd0,0)
    And it shows something entirely different now. For a blink of about 0.5 seconds, it shows:
    Booting 'Windows 7'
    rootnoverify (hd0,0)
    chainloader +1
    GRUB loading stage2...
    After that 0.5 seconds GRUB goes back to the "system select" screen, the countdown to the default choice goes again, and this whole process loops to eternity...
    Problem solved! Frankly speaking, I can't really know why. Everything was solved after I reinstalled both systems. The only difference was that the line makeactive was commented out, not deleted... And I think it is that.
    Last edited by matnik (2010-11-20 14:55:04)

  • Xpath Query to find parent nodes

    My XMl is like this
    <UserAgent1>
    <Name>QTS </Name>
    <NetworkFamily>GSM</NetworkFamily>
    <NetworkSupportedMap>0x06</NetworkSupportedMap>
    </UserAgent1>
    <UserAgent2>
    <Name>QuickTime</Name>
    <NetworkFamily>GSM</NetworkFamily>
    <NetworkSupportedMap>0x06</NetworkSupportedMap>
    </UserAgent2>
    Now if they give a search String like "GSM" without specifying any tag
    Then i use the xpath query
    //*[contains(text(),'GSM')]
    This will give me the child element <NetworkFamily>GSM</NetworkFamily> . .and with this i will find out the parent element which is <UserAgent1> & <UserAgent2>
    IS there any query which will give me directly the Parent Nodes whose childnodes contain the given text ?

    Well, of course there is. But I couldn't remember how so I googled the keywords "xpath parent". The first link that came back suggested
    //*[contains(text(),'GSM')]/..
    and the second suggested the parent axis
    parent::(//*[contains(text(),'GSM')]) or maybe //parent::*[contains(text(),'GSM')]
    So yes, there's several ways. And they were easy to find with Google too.

Maybe you are looking for

  • Ref GTX 680 2nd DVI port stopped working

    I'm having trouble with my GTX 680 second DVI port. It seems to register that it's connected, but doesn't have any signal. Now, it's worked perfectly for weeks... until I replugged it yesterday. My set-up (that used to work): >DVI port 1 goes to main

  • Special General Ledger

    Hi to all,            My question is that, why we put down payment received and down payment paid in special G.L. though we can direct post it into G.L. and Second question is that how we process these down payment after settlement of full amount pai

  • IMac to Macbook Pro, and taking many hours to export

    Hello! I created a show on my iMac, and now want to get it to my Macbook Pro to take it to work to present it. How do I do that? I exported my show, but it has been 6 hours now and it's still exporting...I presume it's stuck? Show has 226 slides... T

  • Disk utility is crashing when trying to create a new image

    Seriously need some help if anyone has an idea of why disk utility is crashing while trying to create a disk image. I'm not finding any other info on this issue. My HD is failing and being replaced tomorrow and I'm desperately trying to create disk i

  • Boot Camp Assistant for Windows XP

    I want to put windows XP on a partition of my hard drive, the problem is, after I run Boot Camp Assistant, the program tells me to inster a Windows 7 Home of Professional into the computer. Unfortuantly, I only have XP, and the program does not recon