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.

Similar Messages

  • How to get the attribute value of an XML file??

    How to get the attribute value of an XML file??
    For example, how to get name and age attributes?
    <student name="Joe" age="20" />

    What are you using to read the XML file??
    On the assumption of JDOM - www.jdom.org. Something along the lines of:SAXBuilder builder = new SAXBuilder(true);
    Document doc = builder.build(filename);
    Element root = doc.getRootElement();
    List children = root.getChildren();
    Element thisElement = (Element)children.get(n);
    String name = thisElement.getAttributeValue("name")
    try
         int age = Integer.parseInt(thisElement.getAttributeValue("age"));
    catch (Exception ex)
         throw new InvalidElementException("Expected an int.....");
    }Ben

  • Extracting the Attributes values of an XML Element

    Dear Forum Members
    Please tell me any XML Function which is used to extract the Attribute value of an XML Element.
    Given below
    <BRKCD_STREDSWTINVIN_C Key="6708">
    is an Element With some Key value.
    I want to have that Key value.
    Using Extract and Extractvalue I am not able to get the Attribute value.
    Is there any way..
    Regards
    Madhu K

    Your xml is not really complete ;), but this should get you started:
    michaels>  with t as
    (select xmltype('<BRKCD_STREDSWTINVIN_C Key="6708"></BRKCD_STREDSWTINVIN_C>') xml from dual)
    select d.xml, d.xml.extract('//BRKCD_STREDSWTINVIN_C/@Key') key
      from t d
    XML                                                            KEY    
    <BRKCD_STREDSWTINVIN_C Key="6708"></BRKCD_STREDSWTINVIN_C>     6708   

  • How to remove the XML attribute value in Indesign file by javascript

    Hi all,
    How to remove the XML attribute value in Indesign file.

    Try this,
    if(elm.xmlElements[i].xmlAttributes[j].name == "aid:pstyle" || elm.xmlElements[i].xmlAttributes[j].name == "aid:cstyle")
    Vandy

  • How to show the VALUE as the Column Header using SQL query?

    Hi
    I have a requirement to show the picked value as the column header using SQL query.
    Example:
    ======
    SELECT EMPNO FROM EMP
    WHERE EMPNO=7934;
    Result Should be:
    7934
    7934

    I have a requirement to show the picked value as the column header using SQL query.In sql*plus you can do
    SQL> set verify on
    SQL> def e =  7934
    old: SELECT empno "&&e"  FROM emp  WHERE empno = &&e
    new: SELECT empno "7934"  FROM emp  WHERE empno = 7934
    SQL> SELECT empno "7934"  FROM emp  WHERE empno = 7934
          7934
          7934
    1 row selected.

  • How to Get xml Attribute value from a given  xpath

    i'm building an xml from 3 columns a,b,c using 'SELECT EXTRACT (XMLELEMENT ("ROOT",.........)'
    and my xml looks something like this
    <ROOT>
    <categories>
    <catogory value="col a value" display="true"/>
    <catogory value="col b value" display="false"/>
    <catogory value="col c value" display="false"/>
    </categories>
    <DATAS>
    </DATA>
    </ROOT>
    now under the datas node i want to use xpath like this
    (case when '/root/categories/catogory/[@display="true"]' then '/root/categories/catogory/@value' else 0 end)
    so tat i get values under data node based on display attributes.... is it possible..
    if not is ther any alternative way of using xpath

    What version of Oracle (4 digits)?
    Are you trying to populate the Data node when you are building the XML originally via your SQL/XML statement or are you talking about modifying some existing XML to add more nodes to it based on data in the XML already?

  • Extract XML attribute value for multi-item sequence

    Guys,
    I have already posted this in the XML DB forum, but am relying that some of you might help me.
    I have been searching for a solution for this and couldn't quite get it. I'm trying to get attribute values from multiple entries in a Node. It workes for a single node, but for multiple nodes, it fails. Could you please give me a solution?
    SQL> select extractvalue(column_value, '/WORLD/COUNTRY/@NAME') COUNTRY_NAME
      2        ,extractvalue(column_value, '/WORLD/COUNTRY/CITY/@NAME') CITY_NAME
      3        ,extractvalue(column_value, '/WORLD/COUNTRY/CITY/@POPULATION') POPULATION
      4  from xmltable('WORLD' passing xmltype('
      5  <WORLD>
      6  <COUNTRY NAME="INDIA">
      7  <CITY NAME="MUMBAI" POPULATION="10000"></CITY>
      8  </COUNTRY>
      9  </WORLD>'
    10  ));
    COUNTRY_NAME CITY_NAME POPULATION
    INDIA MUMBAI 10000When I execute the same for multiple nodes, it fails, please guide me. Please also let me know how to handle if I have an XML file containing this data.
    SQL> select extractvalue(column_value, '/WORLD/COUNTRY/@NAME') COUNTRY_NAME
      2        ,extractvalue(column_value, '/WORLD/COUNTRY/CITY/@NAME') CITY_NAME
      3        ,extractvalue(column_value, '/WORLD/COUNTRY/CITY/@POPULATION') POPULATION
      4  from xmltable('WORLD' passing xmltype('
      5  <WORLD>
      6  <COUNTRY NAME="INDIA">
      7  <CITY NAME="MUMBAI" POPULATION="10000"></CITY>
      8  <CITY NAME="CHENNAI" POPULATION="2000"></CITY>
      9  <CITY NAME="BANGALORE" POPULATION="13000"></CITY>
    10  <CITY NAME="HYDERABAD" POPULATION="14000"></CITY>
    11  </COUNTRY>
    12  </WORLD>'
    13  ));
    select extractvalue(column_value, '/WORLD/COUNTRY/@NAME') COUNTRY_NAME
    ERROR at line 1:
    ORA-19025: EXTRACTVALUE returns value of only one nodeCheers
    Sarma.

    So, this is the first step:
    SQL> with test as
      2  (select xmltype('<WORLD>
      3                 <COUNTRY NAME="INDIA">
      4                 <CITY NAME="MUMBAI" POPULATION="10000"></CITY>
      5                 <CITY NAME="CHENNAI" POPULATION="2000"></CITY>
      6                 <CITY NAME="BANGALORE" POPULATION="13000"></CITY>
      7                 <CITY NAME="HYDERABAD" POPULATION="14000"></CITY>
      8                 </COUNTRY>
      9  </WORLD>') resp from dual)
    10  select country
    11       , cities
    12  from xmltable('WORLD/COUNTRY' passing (select resp from test)
    13                         columns country varchar2(50) path '/COUNTRY/@NAME'
    14                               , cities xmltype path '/COUNTRY/CITY') world
    15  /
    COUNTRY         CITIES
    INDIA           <CITY NAME="MUMBAI" POPULATION="10000"/><CITY NAME
                    ="CHENNAI" POPULATION="2000"/><CITY NAME="BANGALOR
                    E" POPULATION="13000"/><CITY NAME="HYDERABAD" POPU
                    LATION="14000"/>two columns, one varchar2 and one xmltype.
    Then do the same thing with the second column, pass the XML to an XMLTABLE function
    SQL> with test as
      2  (select xmltype('<WORLD>
      3                 <COUNTRY NAME="INDIA">
      4                 <CITY NAME="MUMBAI" POPULATION="10000"></CITY>
      5                 <CITY NAME="CHENNAI" POPULATION="2000"></CITY>
      6                 <CITY NAME="BANGALORE" POPULATION="13000"></CITY>
      7                 <CITY NAME="HYDERABAD" POPULATION="14000"></CITY>
      8                 </COUNTRY>
      9  </WORLD>') resp from dual)
    10  select country
    11       , cit.name
    12       , cit.population
    13  from xmltable('WORLD/COUNTRY' passing (select resp from test)
    14                         columns country varchar2(50) path '/COUNTRY/@NAME'
    15                               , cities xmltype path '/COUNTRY/CITY') world
    16     , xmltable ('CITY' passing cities
    17                columns name varchar2(50) path '@NAME'
    18                      , population number path '@POPULATION'
    19                ) cit
    20  ;
    COUNTRY         NAME                                               POPULATION
    INDIA           MUMBAI                                                  10000
    INDIA           CHENNAI                                                  2000
    INDIA           BANGALORE                                               13000
    INDIA           HYDERABAD                                               14000

  • Xml attribute value

    I'm having trouble getting a specific attribute value when
    parsing the xml tree. I need to get the chidNode that matches
    my attribute
    request. Is there an easy way to say if the attribute value =
    1234 then return
    its nodevalue
    myXML = new XML();
    myXML.load("sample.xml");
    myXML.ignoreWhite = true;
    myXML.onLoad=feeds;
    function feeds(){
    myroot = myXML.firstChild;
    people = myroot.firstChild;
    students = people.childNodes;
    if(students.attributes.id == '1234')
    trace('yes record found')
    the xml at the students level lookss like this
    <student id="2214">
    <name></name>
    </student>
    <student id="1234">
    <name></name>
    </student>
    <student id="4567">
    <name></name>
    </student>
    thanks

    Well, assuming there is an associated end tag (aka </TEST>) somewhere in your XML, then the XML fragment you show is well-formed XML.
    If by "XML functions", you mean something like XMLElement/XMLForest/XMLAgg, then you can be safe to know that it generates well-formed XML.
    What is this "xml editor" that you mention but don't name. It sounds as if the issue lies with that tool, based off what little you have provided.
    The more details you provide, the better answer you get.

  • InDesign CS3 crash during document open (at XML Attribute Value update for locked item)

    OS: Windows XP
    InDesign: InDesign Release 5.0.0.458   
    Plugins: No additional plugins
    I am facing crash in InDesign at following workflow
    Steps:
    1. Create a new document.
    2. Create a graphic frame.
    3. Place an Image (C:\TESTDIR\images\test-image.jpg)
    4. Tag the graphic frame (Right Click -> Autotag).
    5. Lock the layer.
    6. Save the doc at (C:\TESTDIR\files\test-doc.indd).
    7. Move the image file to (C:\TESTDIR\)
    8. Open the same document.
    9. InDesign Crash.
    Crash log:
    Adobe InDesign Protective Shutdown Log
    06/01/09 14:48:51
    Unhandled error condition
    Session started up at 2:44 PM on Monday, June 01, 2009
    Version: 5.0.0 - Build: 458
    Error Code 0xbfcd: "Cannot modify elements that contain locked content, or are contained by locked content. Please unlock or check out the content and try again."
    Command Sequence:
    > kOpenFileWithWindowCmdBoss = ""
    > kOpenFileCmdBoss = ""
      > kOpenDocCmdBoss = ""
       > kSetDocNameCmdBoss = ""
       > kSetDocNameCmdBoss = ""
    > kSetAllUsedStyleCmdBoss = ""
      > kSetAllUsedStyleCmdBoss = ""
    > kRestoreLinkCmdBoss = "Restore Link" : kBeforeDoMessageBoss @ kDocBoss (IID_ICOMMANDMGR)
    > kSetAssetAttributesCmdBoss = "" : kBeforeDoMessageBoss @ kDocBoss (IID_ICOMMANDMGR)
      > kSetAssetAttributesCmdBoss = "" : kAfterDoMessageBoss @ kDocBoss (IID_ICOMMANDMGR)
    > kXMLSetAttributeValueCmdBoss = "Set Attribute Value" : kBeforeDoMessageBoss @ kDocBoss (IID_ICOMMANDMGR)
      > kXMLSetAttributeValueCmdBoss = "Set Attribute Value" : kAfterDoMessageBoss @ kDocBoss (IID_ICOMMANDMGR)
    > kRestoreLinkCmdBoss = "Restore Link" : kAfterDoMessageBoss @ kDocBoss (IID_ICOMMANDMGR)
    Please let me know how to stop XML tag updation (execution of  kXMLSetAttributeValueCmdBoss) at document open.

    Is the first time one of these files crashes always on one system or another, or is it random across systems?
    It is random and it's not related to a file (one time i can open the file andanother time it cause an InDesign crash);
    It sounds very much like a font problem. Are you using a font manager, and if so, which one?
    We have reproduced the problem also on machine with only system's fonts.
    I forgot to say that the crashes happen only with InDesign files with InCopy files linked in.
    Thanks
    Alessandro

  • How to extract attribute value from an XML

    I have column where all my diffrent structures of XML's are getting stored. I want extract a patticular attribute value from all the XML’s. Can any one help me with this?
    Thanks,
    swagath

    Kindly refer to the EXTRACTVALUE function in your online documentation and refrain from further doc questions.
    Sybrand Bakker
    Senior Oracle DBA

  • Using Oracle Text to find attribute values in a XML document

    Can anybody help me? I created a index on a URIType column,
    create index my_index on uri_tab(docurl) indextype is ctxsys.context parameters ('SECTION GROUP my_sections').
    Before index creation I executed these two functions, which prepare Oracle on text search in attribute sections: ctx_ddl.create_section_group('my_sections','XML_SECTION_GROUP') and exec ctx_ddl.add_attr_section('my_sections','machinetype','MachineType@text')
    After index build I looking for an attribute value.
    SELECT e.docName FROM uri_tab e WHERE CONTAINS(e.docurl,'SM_52 WITHIN machinetype') > 0;

    An advise to read Oracle documentation is great but I have done it already and didn't find a way to check a syntax of an attribute retrived from LDAP server.
    I haven't find anything new in $ORACLE_HOME/RDBMS/admin/dbmsldap.sql as well.
    Let's take an example. I have taken some attribute from LDAP server by dbms_ldap.first_attribute and would like to know if the values of this attribute are strings or some binary staff.
    How can I do it?

  • XSLT Mapping - replacing attribute value of a specific node

    Hi,
    I want to replace the value of an attribute for a specific node. Can you please tell me how this can be achieved using XSLT coding?
    The input file is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <GovTalkMessage xmlns="http://www.govtalk.gov.uk/CM/envelope">
         <EnvelopeVersion>2.0</EnvelopeVersion>
         <Header>
              <MessageDetails>
                   <Class>IR-PAYE-MOV</Class>
                   <Qualifier>request</Qualifier>
                   <Function>submit</Function>
                   <CorrelationID/>
                   <Transformation>XML</Transformation>
                   <GatewayTimestamp/>
              </MessageDetails>
              <SenderDetails>
                   <IDAuthentication>
                        <SenderID>isv142</SenderID>
                        <Authentication>
                             <Method>MD5</Method>
                             <Value>1L2xFE8WqHHI5iVMGhixAg==</Value>
                        </Authentication>
                   </IDAuthentication>
              </SenderDetails>
         </Header>
         <GovTalkDetails>
              <Keys>
                   <Key Type="TaxOfficeNumber">123</Key>
                   <Key Type="TaxOfficeReference">MD345</Key>
              </Keys>
              <ChannelRouting>
                   <Channel>
                        <URI>0142</URI>
                   </Channel>
              </ChannelRouting>
         </GovTalkDetails>
         <Body>
              <IRenvelope xmlns="http://www.govtalk.gov.uk/taxation/PAYE/MOV/09-10/1">
                   <IRheader>
                        <Keys>
                             <Key Type="TaxOfficeNumber">123</Key>
                             <Key Type="TaxOfficeReference">MD345</Key>
                        </Keys>
                        <PeriodEnd>2009-09-29</PeriodEnd>
                        <DefaultCurrency>GBP</DefaultCurrency>
                        <IRmark Type="generic">03Bfkipk6UDWSXLj77ObBVoK894=</IRmark>
                        <Sender>Company</Sender>
                   </IRheader>
                   <InYearMovements>
                        <EmployerName>form p60</EmployerName>
                        <P46 Statement="A">
                             <Name>
                                  <Fore>Smith</Fore>
                                  <Sur>John</Sur>
                             </Name>
                             <Address>
                                  <Line>Sterling Residency</Line>
                                  <Line>Gehde</Line>
                                  <Line>Hedge End</Line>
                                  <Line>Southampton</Line>
                                  <PostCode>12345678</PostCode>
                             </Address>
                             <WorksNumber>20090030</WorksNumber>
                             <NINO>NP258719D</NINO>
                             <BirthDate>1985-07-11</BirthDate>
                             <Gender>male</Gender>
                             <StartDate>2009-04-20</StartDate>
                             <TaxCodeInUse>647L</TaxCodeInUse>
                        </P46>
                   </InYearMovements>
              </IRenvelope>
         </Body>
    </GovTalkMessage>
    I want to replace the value 'http://www.govtalk.gov.uk/taxation/PAYE/MOV/09-10/1' of attribute xmlns belonging to the node 'IRenvelope' with the value 'http://www.govtalk.gov.uk/taxation/PAYE/MOV/10-11/1'
    So the output of the mapping should be:
    <?xml version="1.0" encoding="UTF-8"?>
    <GovTalkMessage xmlns="http://www.govtalk.gov.uk/CM/envelope">
         <EnvelopeVersion>2.0</EnvelopeVersion>
         <Header>
              <MessageDetails>
                   <Class>IR-PAYE-MOV</Class>
                   <Qualifier>request</Qualifier>
                   <Function>submit</Function>
                   <CorrelationID/>
                   <Transformation>XML</Transformation>
                   <GatewayTimestamp/>
              </MessageDetails>
              <SenderDetails>
                   <IDAuthentication>
                        <SenderID>isv142</SenderID>
                        <Authentication>
                             <Method>MD5</Method>
                             <Value>1L2xFE8WqHHI5iVMGhixAg==</Value>
                        </Authentication>
                   </IDAuthentication>
              </SenderDetails>
         </Header>
         <GovTalkDetails>
              <Keys>
                   <Key Type="TaxOfficeNumber">123</Key>
                   <Key Type="TaxOfficeReference">MD345</Key>
              </Keys>
              <ChannelRouting>
                   <Channel>
                        <URI>0142</URI>
                   </Channel>
              </ChannelRouting>
         </GovTalkDetails>
         <Body>
              <IRenvelope xmlns="http://www.govtalk.gov.uk/taxation/PAYE/MOV/10-11/1">
                   <IRheader>
                        <Keys>
                             <Key Type="TaxOfficeNumber">123</Key>
                             <Key Type="TaxOfficeReference">MD345</Key>
                        </Keys>
                        <PeriodEnd>2009-09-29</PeriodEnd>
                        <DefaultCurrency>GBP</DefaultCurrency>
                        <IRmark Type="generic">03Bfkipk6UDWSXLj77ObBVoK894=</IRmark>
                        <Sender>Company</Sender>
                   </IRheader>
                   <InYearMovements>
                        <EmployerName>form p60</EmployerName>
                        <P46 Statement="A">
                             <Name>
                                  <Fore>Smith</Fore>
                                  <Sur>John</Sur>
                             </Name>
                             <Address>
                                  <Line>Sterling Residency</Line>
                                  <Line>Gehde</Line>
                                  <Line>Hedge End</Line>
                                  <Line>Southampton</Line>
                                  <PostCode>12345678</PostCode>
                             </Address>
                             <WorksNumber>20090030</WorksNumber>
                             <NINO>NP258719D</NINO>
                             <BirthDate>1985-07-11</BirthDate>
                             <Gender>male</Gender>
                             <StartDate>2009-04-20</StartDate>
                             <TaxCodeInUse>647L</TaxCodeInUse>
                        </P46>
                   </InYearMovements>
              </IRenvelope>
         </Body>
    </GovTalkMessage>
    Thanks & Regards,
    Aditi Naik

    Hi,
    You get name of an attribute by this code
    <xsl:for-each select="@*">
        <xsl:text>Value of </xsl:text>
               <xsl:value-of select="name(.)"/>
        <xsl:text> is </xsl:text><xsl:value-of select="."/>
    </xsl:for-each>
    Change value by providing new value in <xsl:value-of select="."/>
    Regards
    suraj

  • Trying to assign an XML attribute value to a button label

    I have a Flex app (developed in FLEX 2) that reads from
    multiple XML files and populates datagrids with element values.
    What I'm trying to do now, is to create a second column with a
    button, enabling users to view archived versions for each current
    report.
    My problem is: I can't get the <mx:Button> label to
    accept the attribute "name". I've tried atleast 10 - 20 different
    syntax.
    My XML file looks like this:
    <metrics>
    <report name="test">
    <link>test Report 10/28/2008</link>
    <url>test-10_28_2008.zip</url>
    <status>active</status>
    </report>
    </metrics>
    The mxml looks like this:
    <mx:Button buttonMode="true" useHandCursor="true"
    click="handleClick()" label="{data.@name}" width="80">
    <mx:Script>
    <![CDATA[
    public function handleClick():void{
    var url:URLRequest = new
    URLRequest([L=http://new.test.com/pages/r_archive_apps/"+data.link+".html");[/L]]http://n ew.test.com/pages/r_archive_apps/"+data.link+".html");[/L][/L]
    navigateToURL(url,"_blank");
    ]]>
    </mx:Script>
    </mx:Button>
    When I try to label a button with an element it works fine.
    Some of the other sytax I've used are:
    - label="{data.report.@name}"
    - label="{data.report.(@name=='test')}"
    - label="{data.report.(@name='test')}"
    - label="{data.@name}"
    - label="{data.metrics.report.@name}"
    - label="{data.metrics.report.(@name=='test')}"
    - label="{data.metrics.report.(@name='test')}"

    quote:
    Originally posted by:
    rtalton
    Can you post some code so we can see how you are using the
    button? I think you may be using the button within a datagrid
    itemRenderer, which might make a difference.
    You're right, the button is in a datagrid itemRenderer. I've
    pasted more dataGrid code below - thanks again.
    <mx:DataGrid id="dgCatalog" dataProvider="{_xlcCatalog}"
    rowCount="4" editable="false" sortableColumns="false"
    left="148" top="65" bottom="42" borderStyle="solid"
    alternatingItemColors="[#ecf8ff, #ffffff]"
    themeColor="#ffff80" alpha="1.0" cornerRadius="0"
    dropShadowEnabled="true" dropShadowColor="#000000" width="549"
    creationCompleteEffect="{glow3}">
    <mx:columns>
    <mx:Array>
    <mx:DataGridColumn editable="false" headerText="Daily -
    Report Names" dataField="link" textAlign="left" width="200">
    <mx:itemRenderer>
    <mx:Component>
    <mx:LinkButton click="handleClick()" label="{data.link}"
    >
    <mx:Script>
    <![CDATA[
    public function handleClick():void{
    var url:URLRequest = new URLRequest("
    http://test.new.com/test/"+data.url);
    navigateToURL(url,"_blank");
    ]]>
    </mx:Script>
    </mx:LinkButton>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    <mx:DataGridColumn editable="false" headerText="Daily -
    Report Archives" dataField="link" textAlign="left" width="80">
    <mx:itemRenderer>
    <mx:Component>
    <mx:Button buttonMode="true" useHandCursor="true"
    click="handleClick()" label="{data.report.@name}" width="80">
    <mx:Script>
    <![CDATA[
    public function handleClick():void{
    var url:URLRequest = new URLRequest("
    http://test.new.com/pages/test_apps/"+data.link+".html");
    navigateToURL(url,"_blank");
    ]]>
    </mx:Script>
    </mx:Button>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    <!--mx:DataGridColumn headerText="URL" dataField="url"
    width="350"/>
    <mx:DataGridColumn headerText="Status" dataField="status"
    width="70"/-->
    </mx:Array>
    </mx:columns>
    </mx:DataGrid>

  • Remove XML node using Xpath

    Hello,
    I'm using J Developer/SOA Suite 11.1.1.6.0 and BPEL 2.0
    I am trying to remove datetime nodes from xml, where the datetime value equals a certain value.  So far I have the following BPEL code:
      <assign name="RemoveEmptyDates">
          <extensionAssignOperation>
            <bpelx:remove>
              <bpelx:target>$GetNewHires_GetWrittenOffersReadyForUpload_OutputVariable.parameters//*[ . instance of xsd:dateTime and xsd:dateTime(.) = xsd:dateTime('0001-01-01T00:00:00')]</bpelx:target>
            </bpelx:remove>
          </extensionAssignOperation>
        </assign>
    I have tried multiple variations of the predicate, but I can't seem to figure it out.  Right now I am getting an error in J Developer that specifies it is expecting an "]" right after the "//*[." portion of the predicate.  Any ideas on this would be greatly appreciated.
    Thanks

    You can't use spaces.
    you have wrong this part of your text:
    [ . instance of xsd:dateTime and xsd:dateTime(.) = xsd:dateTime('0001-01-01T00:00:00')]
    check it.

  • How to store user input as an xml Parameter value in log4j.xml?

    I am working on an app that is blend of log4j , EJBs, JMS, weblogic.
    In log4j, I have specified the value of  file appender;
    but now what I  wanna do is: Take path for File (For File Appender) from user and use it as a File path for File Appender in log4j.xml 
    Kindly guide me
    Thank you!

    I think the display of the trace in a standard WDA-component would be the best solution. Maybe Carsten Ziegler can help.
    You can return the trace from the BRFplus-function call and can extract everything using XSLT (CALL TRANSFORMATION command):
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" xmlns:asx="http://www.sap.com/abapxml" version="1.0">
      <xsl:strip-space elements="*"/>
      <xsl:template match="/">
        <asx:abap>
          <asx:values>
            <ROOT>
              <xsl:apply-templates/>
            </ROOT>
          </asx:values>
        </asx:abap>
      </xsl:template>
      <xsl:template match="/FDT/LOG/TEXT">
        <item>
          <xsl:value-of select="string(.)"/>
         </item>
         <xsl:apply-templates/>
      </xsl:template>
      <xsl:template match="/FDT/LOG/CONTEXT_UPDATE">
        <item>
          <xsl:value-of select="concat(string(@DataObjectName), ' is assigned to ' , string(text()))"/>
         </item>
         <xsl:apply-templates/>
      </xsl:template>
      <xsl:template match="text() | @*">
      </xsl:template>
    </xsl:transform>
    You have to adjust the transformation to get the result you need.
    Best Regards,
    Tobias
    P.S.: I'm still thinking about a better solution...

Maybe you are looking for

  • Why I can't use the Folio Builder panel on my Indesign 5.5?

    When I launch the Folio Builder panel in my Indesign 5.5. There is a message that says "To start the digital publishing authoring process, please download the update for the Folio Producer components and relaunch your application." I have downloaded

  • Configurable material cost estimate

    Hi All, We have lot of configurable materials and some are finished materials and some are semi-finished. If semi-finished configurable material used in Finished materials, Semi-finished configurable material costs is not roll up correctly for Finish

  • Using JDeveloper11 with Oracle9

    Hi, I'm trying to use JDeveloper 11 (latest version) with Oracle 9. I'm trying to make an OCI (not thin) connection, and I'm failing with a message like "no ocijdbc11 in java.library.path", which had me mystified for a while as I thought I had fixed

  • Help with ResultSetMetaData.getColumntype()

    For some reason when I call the getColumnType() on a ResultSetMetaData object I get a -9 for VARCHAR objects, but it's suppose to be 12 (based on java.sql.TYPES). I am connecting to a SQL Server Database using ODBC drivers. Thanks, Dan

  • How do I delete photos in iPad not currently in ITunes?

    I'm doing this for wife who has iPad, (1st gen; not new iPad 2). When she got it she wanted, "her photos," from her computer in her iPad. Happy to accomodate, I managed to load all 3,000 photos from her Nikon Picture Project software into her iPad. N