XML count nodes?

Hi everyone,
I'm developing part of a website that will open up an XML /
RSS file (downloaded nightly from another site), extract article
text and href link, then dump that info into an HTML DIV.
The problem I've having is that I've only been able to get it
to work by hard setting a number of articles (nodes) to process.
In the attached code, you can see that I've set it number of
items at 10 [see: <cfset numItems = 10>]. Of course when
there are more then 10 articles, I'm only seeing 10, and when
there's less then 10, the whole script blows up.
Is there a good way to dynmaicly set the #numItems# variable
by coutning the nodes under "mydoc.feed.entry.content" in the XML
file?
Thanks in advance,
- Ian in Los Angeles

I think you can use ArrayLen().
Check out this page, it really details all that you can do in
Coldfusion as far as manipulating XML objects:
http://livedocs.macromedia.com/coldfusion/7/htmldocs/00001514.htm
Specifically, change your numItems line to:

Similar Messages

  • Unable to Count Nodes using ora:countNodes , the count is always 0

    B2B is connected to BPEL , the xsd used for the given xml is :
    <?xml version="1.0" encoding="windows-1252" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://www.example.org"
    targetNamespace="http://www.example.org"
    elementFormDefault="qualified">
    <xsd:element name="Root">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Batch">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Warehouse" type="xsd:string"/>
    <xsd:element name="BatchDate" type="xsd:integer"/>
    <xsd:element name="Revision" type="xsd:string"/>
    <xsd:element name="OnHand" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="ItemCode" type="xsd:string"/>
    <xsd:element name="SOH" type="xsd:integer"/>
    <xsd:element name="Quarantine" type="xsd:integer"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    Count nodes function used by me is :
    ora:countNodes('receive_InventoryReconcilliation_receive_InputVariable','body','/ns2:Root/ns2:Batch/ns2:OnHand/ns2:ItemCode')
    or
    ora:countNodes('receive_InventoryReconcilliation_receive_InputVariable','body','/ns2:Root/ns2:Batch/ns2:OnHand/ns2:ItemCode')
    I have tried using countNodes in above two ways.
    Inspite of that i always get count of nodes as 0.
    How should i resolve this issue ?
    Thanks in advance,
    Sasmit
    Edited by: Sasmit on Jun 6, 2011 6:09 AM

    Hi Sasmit...
    i was facing a same problem recently...i can see the B2B adaptor giving the file as input to my BPEL process but the count is coming as zero...then what i did was..i tried copying the value of an element in the input variable...i cannot copy the value too...So, then i figured out that when i defined the document definition in B2B console, we will be giving the XSD file right...that schema file is not in sink with the file being picked up...may be i might have done amistake while generating the XSD file for a particular document in B2B Editor...then later i created the document definition i mean the xsd file in B2B Editor and used that new XSD file in my document definition...then i could access all the data in my BPEL process...
    Just try this..,may be it helps.
    Thanks,

  • Tree control with xml last node!

    The question is how to view the tree lastleaf as last
    nodename + nodevalue in an xmlobject?
    <node1>
    <node1a>10
    </node1a>
    </node1>
    <node2>
    <node2a>
    <node2b>20
    </node2b>
    </node2a>
    </node2>
    I want the tree structure like:
    Node1 (folder icon)
    Node1a = 10 (doc icon)
    Node2
    Node2a
    Node2b = 20 (doc icon)
    In Flex the tree views:
    Node1 (folder icon)
    Node1a (folder icon)
    10 (doc icon)
    Node2
    Node2a
    Node2b (folder icon)
    20 (doc icon)
    in my app I get a result from a webservice that returns some
    nodes that can have one or more values. Say Node1a can have 10, 34,
    43, so in the tree leaf I it should view Node1a = 10, 34, 43.
    Any suggestions?

    The problem is when the value is between xml tags (
    <node>value</node>) the node name gets folder icon and
    value gets doc. icon.
    With lot of last elements, one has to click every node to see
    the values.
    With labelFunction every leaf gets null value:
    If hasComplex return localname
    Else
    Return localname + children
    When I try to pars xml to new one, hasChildren returns true
    for las element, and if there is no value the node shows null.
    Then walking the xml recursively how do I insert the nodes in
    new xml with the same structure but tags like (<node
    data=”value” />)? (to XMLListCollection)
    Hope it’s clearer

  • Error preverifying class javax.xml.soap.Node

    Hi everybody,
    I want to send SOAP messages from a mobile phone. So I use the J2ME Wireless Toolkit 2.2 and the packages saaj-api.jar and dom.jar. But when I build the project, I always have that error:
    Error preverifying class javax.xml.soap.Node
        java/lang/NoClassDefFoundError: org/w3c/dom/Node
    Build failedI don't understand because the class Node is well included in the package dom.jar. Could everyone can help me please?
    Thanks in advance

    hi ,I am also having the same problem.If u got the solution for that please tell me what can i do for those preverifying class error

  • How to count nodes?

    I'm new to DOM and am trying to understand the node hierarchy structure. I have the following sample XML file.
    To understand what constitutes a "Node", I count and print the child nodes that are within the "slideshow" node. The result I get is that there are 5 nodes and the node names are: #Text, slide, #Text, slide, #Text
    Can anyone explain to me how--based on the xml file below, there are 5 nodes within the slideshow element?
    <!-- A SAMPLE set of slides -->
    <slideshow title="Sample Slide Show" date="Date of publication" author="Yours Truly">
         <slide type="all">
              <title>Wake up to WonderWidgets!</title>
         </slide>
         <slide type="all">
              <title>Overview</title>
              <item>Why
                   <em>WonderWidgets</em>
                   are great</item>
              <item/>
              <item>Who <em>buys</em> WonderWidgets</item>
         </slide>
    </slideshow>

    #Text nodes are Whitespace nodes.
    Refer to http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/dom/2b_display.html

  • Grabbing the elements from the XML root node

    Hello,  I haven't worked with XML in over a year and I didn't use it much then.  I'm trying to remember the best way to get the values from the root note (not child nodes).
    For instance, in the following xml, I want the timestamp and the messageID from stumessages.
    I can't recall if you are supposed to use xmlsearch or something else.  I know how to grab the child nodes (for some reason, that part was easier to recall).
    <cfsavecontent variable="XMLFile"><?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE stuMessages SYSTEM "http://cody.glpconnect.com/DTD/StuMessage_Rev6.dtd">
    <stuMessages timeStamp="14/05/2012 08:02:11 GMT" messageID="9768c7201b6f100585fbfa3243489116">
         <stuMessage>
              <esn>0-999999</esn>
              <unixTime>1336982529</unixTime>
              <gps>N</gps>
              <payload length="9" source="pc" encoding="hex">0x3530E2B18801031200</payload>
         </stuMessage>
    </stuMessages>
    </cfsavecontent>
    <!--- Set the XML to a XML parsed variable we can use --->
    <cfset MyXMLDoc = xmlParse(XMLFile) />
    <!--- Dump the XML --->
    <h2>Dump</h2>
    <!--- <cfdump var="#MyXMLDoc#"> --->
    <!--- Get all Message Nodes --->
    <cfset messageNodes = xmlSearch(MyXMLDoc,'/stuMessages/stuMessage')>
    <cfoutput>
        <h2>Message Nodes</h2>
        <cfloop from="1" to="#arraylen(messageNodes)#" index="i">
            <!--- The array contents need to parsed so you can easily get at the child nodes children and attributes. --->
            <cfset messageXML = xmlparse(messageNodes[i]) />
            <b>esn:</b> #messageXML.stuMessage.esn.xmltext#<br>
            <b>unixTime:</b> #messageXML.stuMessage.unixTime.xmlText#<br>
            <b>gps:</b> #messageXML.stuMessage.gps.xmlText#<br>
            <b>payload:</b> #messageXML.stuMessage.payload.xmlText#<br><br>
        </cfloop>
    </cfoutput>
    Best regards
    KR

    Hello,
    I figured it out.
    I figured I would update my post in case anyone else was curious.
    I just need to add the following two lines into the code to expose the elements of the root node.
        <cfset timeStamp = MyXMLDoc.stuMessages.XmlAttributes.timeStamp>
        <cfset messageid = MyXMLDoc.stuMessages.XmlAttributes.messageID>
    The full code follows
    <!--- Set the XML to a XML parsed variable we can use --->
    <cfset MyXMLDoc = xmlParse(XMLFile) />
    <!--- Dump the XML --->
    <h2>Dump</h2>
    <!--- <cfdump var="#MyXMLDoc#"> --->
    <!--- Get all Message Nodes --->
    <cfset messageNodes = xmlSearch(MyXMLDoc,'/stuMessages/stuMessage')>
    <cfoutput>
        <cfset timeStamp = MyXMLDoc.stuMessages.XmlAttributes.timeStamp>
        <cfset messageid = MyXMLDoc.stuMessages.XmlAttributes.messageID>
        #timeStamp#<br />
        #messageid#<br />
        <h2>Message Nodes</h2>
        <cfloop from="1" to="#arraylen(messageNodes)#" index="i">
            <!--- The array contents need to parsed so you can easily get at the child nodes children and attributes. --->
            <cfset messageXML = xmlparse(messageNodes[i]) />
            <b>esn:</b> #messageXML.stuMessage.esn.xmltext#<br>
            <b>unixTime:</b> #messageXML.stuMessage.unixTime.xmlText#<br>
            <b>gps:</b> #messageXML.stuMessage.gps.xmlText#<br>
            <b>payload:</b> #messageXML.stuMessage.payload.xmlText#<br><br>
        </cfloop>
    </cfoutput>

  • Retrieving a xml element/node as clob

    New at this - so forgive the basic frustration here...
    I have successfully loaded an XML file to be stored as Binary XML table in Oracle 11g. The XML file represents and describes data for use on websites, hence there is a vary large node representing the body text of an HTML page.
    I have not attempted loading this XML file with an internal DTD or external xsd at this time, trying to keep things simple for now.
    The following query results in an error
    SELECT extractValue(value(c),'/article/article_body_page_html') article_body_page_html
    FROM WEBSITE_CONTENT2 a,
    TABLE(XMLSequence(Extract(object_value,'/website_content2'))) b,
    TABLE(XMLSequence(Extract(value(b),'/website_content2/articles/article'))) c
    WHERE extractValue(value(c),'/article/article_id') = '61041';
    ERROR String result too large
    I have tried XMLCAST(extractValue(value(c),'/article/article_body_page_html') AS CLOB) to no avail
    It would seem I cannot be the first person running into this issue - and not being a PL/SQL or XML guru - I need some specific examples of retrieving a node/element where the data represented is:
    1. Variable in length
    2. Exists in the xml file as cdata
    3. probably well over 4000 characters.
    Could someone please help to provide a solution to what seems a very basic issue.
    Thanks in advance.

    From the 11.1 documentation on ExtractValue it has
    "For documents based on XML schemas, if Oracle can infer the type of the return value, then a scalar value of the appropriate type is returned. Otherwise, the result is of type VARCHAR2. For documents that are not based on XML schemas, the return type is always VARCHAR2."
    You should be able to use (not tested)
    extract(value(c),'/article/article_body_page_html/text()').getClobVal()to get around this problem and ensure the extracted data is always treated as a clob by Oracle.

  • XML input: Node

    hi experts.
              I can't create an XML input file for my custom BO with node items.
              When I export the XML file from the schema, a warning pops up showing that it is not exportable.
              Is it because of the schema that I created from Service Integration?
    Regards,
    May T.

    Hello Fred and thank you very much for your help!
    That is exactly what I did.
    Here is the code of my staging Expense report, the dummy BO:
    import AP.Common.GDT as apCommonGDT;
    import AP.ExpenseReimbursementManagement.Global as ERM;
    businessobject StagingExpenseReport {
            element MyInputrow: ID;
            element MyExpenseReportID: ExpenseReportID;
            element MyEmployeeID: EmployeeID;
            element MyExpenseReportTypeCode: ExpenseReportTypeCode;
            element MyPeriod: UPPEROPEN_LOCAL_DateTimePeriod;
            element MyDescription: LANGUAGEINDEPENDENT_EXTENDED_Text;
            element MyReferenceExpenseReportReceiptID: ID;
            element MyReceiptTypeCode: ExpenseReportExpenseTypeCode;
            element MyReceiptCategoryCode: ExpenseReportExpenseCategoryCode;
            element MyAmount: Amount;
            element MyPaymentAmount: Amount;
            element MyNetAmount: Amount;
            element MyReceiptDate: Date;
            element SameExpenseReport: Indicator;
    But with this BO structure you can only create one Item/Receipt in each Staging Expense report. [1-1] relationship as everything is in the Root node.
    So for example, in order to get a standard expense report with 2 receipts, I would need to create two instances of my Staging/dummy BO from the XML, each with one receipt. And using the ABSL to find which dummy BO goes to which Expense Report.
    Am I mistaking or I understood well?
    Because the thing is we cannot XML upload a child node in a custom BO neither if I got it right.
    Thank you very much for your attention.
    Best regards.
    Jacques-Antoine Ollier

  • Binary tree - counting nodes

    i have got a binary tree and i need to write a method which can count the number of leaves.
    i have written the code as
    static int countLeaves(BinaryNode node) {
            if (node == null) {
                return 0;
            else if (node.left == null && node.right == null) {
                return 1;
            return countLeaves(node.left) + countLeaves(node.right);
    }but, how can i put the method in the main funcion, i have tried
    int leafCount = countLeaves(root);it gives an error message "non-static variable root cannot be referenced from a static context". How can i solve this problem? Thank you.

    the code looks like:
    public class BinaryTree<AnyType>
        public BinaryTree( )
            root = null;
        public BinaryTree( AnyType rootItem )
            root = new BinaryNode<AnyType>( rootItem, null, null );
        public void printPreOrder( )
            if( root != null )
                root.printPreOrder( );
        public void printInOrder( )
            if( root != null )
               root.printInOrder( );
        public void printPostOrder( )
            if( root != null )
               root.printPostOrder( );
        public void makeEmpty( )
            root = null;
        public boolean isEmpty( )
            return root == null;
        public void merge( AnyType rootItem, BinaryTree<AnyType> t1, BinaryTree<AnyType> t2 )
            if( t1.root == t2.root && t1.root != null )
                System.err.println( "leftTree==rightTree; merge aborted" );
                return;
            if( this != t1 )
                t1.root = null;
            if( this != t2 )
                t2.root = null;
        public BinaryNode<AnyType> getRoot( )
            return root;
        private BinaryNode<AnyType> root;
        static int countLeaves(BinaryNode node) {
            if (node == null) {
                return 0;
            else if (node.left == null && node.right == null) {
                return 1;
            return countLeaves(node.left) + countLeaves(node.right);
        static public void main( String [ ] args )
            BinaryTree<Integer> t1 = new BinaryTree<Integer>( 1 );
            BinaryTree<Integer> t3 = new BinaryTree<Integer>( 3 );
            BinaryTree<Integer> t5 = new BinaryTree<Integer>( 5 );
            BinaryTree<Integer> t7 = new BinaryTree<Integer>( 7 );
            BinaryTree<Integer> t2 = new BinaryTree<Integer>( );
            BinaryTree<Integer> t4 = new BinaryTree<Integer>( );
            BinaryTree<Integer> t6 = new BinaryTree<Integer>( );
            t2.merge( 2, t1, t3 );
            t6.merge( 6, t5, t7 );
            t4.merge( 4, t2, t6 );
            // i want to run the method countLeaves here
            int leafCount = countLeaves(root);
            System.out.println("Number of leaves: "+leafCount);
    }

  • XML Optional node

    In the below XML code how to make the   <CUSTOMERDETAILS> node as Optional node.
    If suppose in the input XML file if   <CUSTOMERDETAILS> node is not available,I want to make the node as optional one.
    As of now system is getting dump, becuase node  data <CUSTOMERDETAILS> is not availbale in the XML file.
    uFEFF<?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates" xmlns:ddic="http://www.sap.com/abapxml/types/dictionary" xmlns:def="http://www.sap.com/abapxml/types/defined">
      <tt:root name="IT_TRANSACTION" type="ddic:ZTABTRANSACTION"/>
      <tt:template>
      <IT_TRANSACTION>
           <tt:loop ref=".IT_TRANSACTION" name="a">
              <item>
              <RETAILSTOREID tt:value-ref="RETAILSTOREID"/>
              <BUSINESSDAYDATE tt:value-ref="BUSINESSDAYDATE"/>
              <TRANSTYPECODE tt:value-ref="TRANSTYPECODE"/>
              <WORKSTATIONID tt:value-ref="WORKSTATIONID"/>
              <TRANSNUMBER tt:value-ref="TRANSNUMBER"/>
              <BEGINTIMESTAMP tt:value-ref="BEGINTIMESTAMP"/>
              <ENDTIMESTAMP tt:value-ref="ENDTIMESTAMP"/>
              <OPERATORQUAL tt:value-ref="OPERATORQUAL"/>
              <OPERATORID tt:value-ref="OPERATORID"/>
      <CUSTOMERDETAILS>
                <tt:loop ref="$a.CUSTOMERDETAILS">
                  <item>
                    <CUSTOMERINFOTYPE tt:value-ref="CUSTOMERINFOTYPE"/>
                    <DATAELEMENTID tt:value-ref="DATAELEMENTID"/>
                    <DATAELEMENTVALUE tt:value-ref="DATAELEMENTVALUE"/>
                  </item>
                </tt:loop>
    </CUSTOMERDETAILS>
    <RETAILLINEITEM>
                <tt:loop ref="$a.RETAILLINEITEM" name="b">
                  <item>
                    <RETAILNUMBER tt:value-ref="RETAILNUMBER"/>
                    <RETAILTYPECODE tt:value-ref="RETAILTYPECODE"/>
                    <ITEMIDQUALIFIER tt:value-ref="ITEMIDQUALIFIER"/>
                    <ITEMID tt:value-ref="ITEMID"/>
                    <RETAILQUANTITY tt:value-ref="RETAILQUANTITY"/>
                    <SALESAMOUNT tt:value-ref="SALESAMOUNT"/>
                    <ENTRYMETHODCODE tt:value-ref="ENTRYMETHODCODE"/>
                    <EXTENSIONS>
                      <tt:loop ref="$b.EXTENSIONS">
                        <item>
                          <FIELDGROUP tt:value-ref="FIELDGROUP"/>
                          <FIELDNAME tt:value-ref="FIELDNAME"/>
                          <FIELDVALUE tt:value-ref="FIELDVALUE"/>
                        </item>
                      </tt:loop>
    </EXTENSIONS>
                  </item>
                </tt:loop>
    </RETAILLINEITEM>
    <TAX>
                <tt:loop ref="$a.TAX">
                  <item>
                    <TAXNUMBER tt:value-ref="TAXNUMBER"/>
                    <TAXTYPECODE tt:value-ref="TAXTYPECODE"/>
                    <TAXAMOUNT tt:value-ref="TAXAMOUNT"/>
                  </item>
                </tt:loop>
    </TAX>
    <EXTENSIONS>
                <tt:loop ref="$a.EXTENSIONS">
                  <item>
                    <FIELDGROUP tt:value-ref="FIELDGROUP"/>
                    <FIELDNAME tt:value-ref="FIELDNAME"/>
                    <FIELDVALUE tt:value-ref="FIELDVALUE"/>
                  </item>
                </tt:loop>
    </EXTENSIONS>
             </item>
           </tt:loop>
      </IT_TRANSACTION>
      </tt:template>
    </tt:transform>
    Edited by: Thomas Zloch on Nov 24, 2010 12:38 PM - please use code tags also for XML structures

    You might be able to solve this using conditional transformations, please see SAP online help for simple transformations:
    http://help.sap.com/saphelp_nw04/helpdata/en/0c/402040abf2c442e10000000a1550b0/frameset.htm
    Please let us know the result.
    Thomas

  • Code to split biztalk xml inner node message in to many

    Hi,
    I want to split inner node message into many. Actually my xml message look like bellow
    <MSg>
    <Header>
    <InterfaceName></InterfaceName>
    </Header>
    <Detail>
    <detail1>1</detail1>
    <detail2>2</detail2>
    <detail3>3</detail3>
    <detail4>4</detail4>
    </Detail>
    </MSg>
    Above message need to be splitted to bellow
    <MSg>
    <Header>
    <InterfaceName></InterfaceName>
    </Header>
    <Detail>
    <detail1>1</detail1>
    <detail2>2</detail2>
    </Detail>
    </MSg>
    <MSg>
    <Header>
    <InterfaceName></InterfaceName>
    </Header>
    <Detail>
    <detail3>3</detail3>
    <detail4>4</detail4>
    </Detail>
    </MSg>
    <MSg>
    Can anyone help me to give the disassemble code to do it 

    Hi,
    You can write your own Custom Disassemble Pipeline Component
    which will break a message into batch of multiple messages. Batch size can be configured at pipeline design time by Implement members of IPersistPropertyBag interface.
    The Scenario provided in the below link is exactly the same as your requirement. You just need to do few tweaks to the
    code.
    http://blogs.msdn.com/b/brajens/archive/2006/12/03/how-to-develop-biztalk-custom-pipeline-components-part2.aspx
    Rachit
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Adding additional instances of xml tags/nodes

    Hi,<br /><br />I have an xml structure attached to a generated pdf that looks something like this:<br /><br />   <page><br />      <page_item><br />         <page_no>0</page_no><br />         <page_read_yn>N</page_read_yn><br />      </page_item><br />   </page><br /><br />and I would like to insert some additional <page_item> nodes into this structure. I have tried using the instanceManager as shown, but I am getting the message that "xfa.record.page.page_item.instanceManager has no properties".<br /><br />try {<br />  xfa.record.page.page_item.instanceManager.addInstance(1); <br />} catch(e) {<br />  app.alert(e);<br />}<br /><br />Just wondering how to add data nodes to the xml attached to the form.<br /><br />thanks,<br />John

    [email protected] wrote:
    > Hi Justin,
    >
    > thanks for the reply.
    >
    > I understand that the instanceManager is used for adding instances of subforms. I am using this effectively in the documents that I have created. I was looking for the xml equivalent of the instanceManager. In talking with premium support, the tech did not have an answer for me, so I thought that I would try the forum.
    >
    > I found a vague reference on one of the replies that suggested this was possible.
    >
    > John
    John,
    Look at the XMLData object in the Acrobat JavaScript Scripting Reference. This might give you
    the capability you're looking for. I've never used it...I just know of its existence.
    Justin Klei
    Cardinal Solutions Group
    www.cardinalsolutions.com

  • Counting Nodes

    Noob question.
    This statement:
    var nTableLength = TableKM.nodes.length;
    is intended to count the child objects (rows) of a table which in my case should be a value of 3.
    But the value in the debugger indicates that it is counting the children of the rows which are cells, a value of 6.
    Is there a way to limit the counting to immediate child objects?
    Thx.

    You want to count the rows as they are the repeating object, not the table. If you had repeating tables your code would work.
    And for .length I think you might need to use resolveNodes() (I'm at home now, just going off the top of my head):
    var oRows = xfa.resolveNodes("TableKM.Row1[*]");
    var nLength = oRows.length;
    You can also use the Instance Manager to count:
    var nLength = TableKM._Row1.count;

  • Unable to count nodes

    Hi,
    In a BPEL process I am working on there is an assignment activity where I assign the count of nodes as a result of a database query. This assignment is failing and am not able to figure out why.
    Here is the bpel fragment for the assignment
    *<assign name="Assign_1" bpelx:validate="yes">*
    *<copy>*
    *<from expression="ora:countNodes(bpws:getVariableData('Receive_1_receive_InputVariable','VvwshFmsHeadersCollection','/ns3:VvwshFmsHeadersCollection/ns3:VvwshFmsHeaders/ns3:vvwshFmsDetailsCollection/ns3:VvwshFmsDetails'))"/>*
    *<to variable="FMSDetailCount"/>*
    *</copy>*
    *</assign>*
    I am polling the database for some parent-child records. The intention is to count the number of child records in the collection.
    Thanks in advance for your time and help. Please let me know if additional information is required.
    Harish

    Hi,
    Just to be sure, my first solution is different from your solution, this is the one you tried ?
    Mine : ora:countNodes('Receive_1_receive_InputVariable','VvwshFmsHeadersCollection','/ns3:VvwshFmsHeadersCollection/ns3:VvwshFmsHeaders/ns3:vvwshFmsDetailsCollection/ns3:VvwshFmsDetails')
    Yours : ora:countNodes(bpws:getVariableData('Receive_1_receive_InputVariable','VvwshFmsHeadersCollection','/ns3:VvwshFmsHeadersCollection/ns3:VvwshFmsHeaders/ns3:vvwshFmsDetailsCollection/ns3:VvwshFmsDetails'))
    romain.

  • Read Xml Child node from XML Blob

    Hi Gurus,
    Greetings
    I am working in oracle 10g /Solaris platform.
    I have table with columns namely id varcha2,pmt blob.
    PMT stores xml file.
    <Products xmlns:source="http://apache.org/cocoon/source/1.0" DocStatus="approved" DocTimeStamp="2013-04-18T06:52:14" DocType="PMT" DocVersion="xUCDM_product_external_1_3.xsd">
    <Product Country="DE" IsAccessory="false" IsLocalized="true" IsMaster="false" Locale="de_DE" lastModified="2013-04-18T00:08:11" masterLastModified="2013-02-25T14:46:40">
    <Assets>
      <Asset code="46PFL8008S_12" description="User manual" extension="pdf" extent="3359201" lastModified="2013-04-18" locale="de_DE" number="001" type="DFU">http://download.p4c.abc.com/files/4/46pfl8008s_12/46pfl8008s_12_dfu_deu.pdf</Asset>
      <Asset code="46PFL8008S_12" description="Leaflet" extension="pdf" extent="970750" lastModified="2013-04-18" locale="de_DE" number="001" type="PSS">http://download.p4c.abc.com/files/4/46pfl8008s_12/46pfl8008s_12_pss_deu.pdf</Asset>
      <Asset code="46PFL8008S_12" description="Quick start guide" extension="pdf" extent="911832" lastModified="2013-04-18" locale="de_DE" number="001" type="QSG">http://download.p4c.abc.com/files/4/46pfl8008s_12/46pfl8008s_12_qsg_deu.zip</Asset>
      <Asset code="46PFL8008S_12" description="Front product photograph - highres 2196x1795" extension="jpg" extent="1989253" lastModified="2013-04-18" locale="global" number="001" type="_FP">http://images.abc.com/is/image/abcConsumer/46PFL8008S_12-_FP-global-001</Asset>
      <Asset code="46PFL8008S_12" description="Alternative product photograph 1 - highres 2196x1795" extension="jpg" extent="603474" lastModified="2013-04-18" locale="global" number="001" type="A1P">http://images.abc.com/is/image/abcConsumer/46PFL8008S_12-A1P-global-001</Asset>
      <Asset code="46PFL8008S_12" description="Alternative product photograph 2 - highres 2196x1795" extension="jpg" extent="407701" lastModified="2013-04-18" locale="global" number="001" type="A2P">http://images.abc.com/is/image/abcConsumer/46PFL8008S_12-A2P-global-001</Asset>
      <Asset code="46PFL8008S_12" description="Alternative product photograph 3 - highres 2196x1795" extension="jpg" extent="174261" lastModified="2013-04-18" locale="global" number="001" type="A3P">http://images.abc.com/is/image/abcConsumer/46PFL8008S_12-A3P-global-001</Asset>
      <Asset code="46PFL8008S_12" description="Alternative product photograph 4 - highres 2196x1795" extension="jpg" extent="109712" lastModified="2013-04-18" locale="global" number="001" type="A4P">http://images.abc.com/is/image/abcConsumer/46PFL8008S_12-A4P-global-001</Asset>
       </Assets>
    </Product>
      </Products>');
      I want the extract the ids from the table where pmt contains the child node (asset) contains .zip
    for example http://download.p4c.abc.com/files/4/46pfl8008s_12/46pfl8008s_12_qsg_deu.zip
    Then, I tried like this...
      select r.* from
       (SELECT xmltype(pmt) object_value
                     FROM PRODUCT_TR_PMT
                     XMLTABLE
                                     'for $Product  in $TEST/Products/Product/Assets/Asset
                                         return <RESULT>
                                                   $Product                     
                                                </RESULT>'
                                     passing OBJECT_VALUE as "TEST"   
                                     columns Asset path 'Asset' 
                                 ) r;
    ORA-02263: need to specify the datatype for this column
      Could you kindly help.
    Thanks
    Raj

    Blob storage we (db folks) dont have any control its from application standard design.
    If necessary, i can create function blob to clob.
    Kindly help me in extracting child node which contains zip.
       select r.* from
       (SELECT xmltype(pmt) object_value
                     FROM PRODUCT_TR_PMT
                     XMLTABLE
                                     'for $Product  in $TEST/Products/Product/Assets/Asset
                                         return <RESULT>
                                                   $Product                     
                                                </RESULT>'
                                     passing OBJECT_VALUE as "TEST"   
                                     columns Asset varchar2(255) path 'Asset' 
                                 ) r;
    ORA-06553: PLS-306: wrong number or types of arguments in call to 'XMLTYPE'Thanks
    Raj

Maybe you are looking for

  • A Custom Class says my class is Null

    Hi, I have a class (Math2) with misc functions for my project. It has a function called CheckRelations() which basically checks a static array in another class (relation). But the Math2 class acts as if the Relation class is non-existent, even though

  • Adapter module in SOAP sender Channel

    Hi, I need to call an adaptermodule to URLdecoding incoming SOAP messages. The adaptermodule i have developed to do the URLdecode works for other adapters but not for the SOAP sender adapter Saphelp says it is not possible to use adaptermodules on th

  • Network Service hanging on boot

    I use Arch on my laptop, and that often means I am using it where there is no network available. I find it terribly annoying when booting up my computer that the system hangs for about 20 seconds on "Configuring Network Interface". My research reveal

  • JMX exposed in SUn App server 8

    Hi Sine Java System Application server 8 is out, does this support JMX out of box as mentioned in the technical paper. http://developers.sun.com/prodtech/appserver/reference/techart/monitoring.html if so can you give me more details on accessing the

  • Flags:Copy Data Points - Missing flags?

    I'm using DIAdem 2012 to extract points from an FFT. Each time I use the "Flags: Copy Data Points" function the channels created are missing the last data point (flag). i.e. Channel contains n-1 points. At the moment I'm adding an extra flag to ensur