AnsweredAssumed Answered

Counting XML elements and Checking for an element

Question asked by vijay.bontapalli137242 on Apr 7, 2016
Latest reply on Jul 10, 2017 by santhosh.ramagiri294095

Is it possible to count elements in a XML document and also checking if an element actually exists in the document without writing any script.

For example, I have a xml document similar to

<Contacts>

       <Contact>

            <Name>Mr. Smith</Name>

            <Phone>123 456 7890</Phone>

            <BusinessAddress>

                 <Line1>100 Washington Street</Line1>

                 <City>Ashburn</City>

                 <Zip>12345</Zip>

                 <State>VA</State>

            </BusinessAddress>

            <BillingAddress>

                 <Line1>100 Washington Street</Line1>

                <City>Ashburn</City>

                 <Zip>12345</Zip>

                 <State>VA</State>

            </BillingAddress>

       </Contact>

       <Contact>

            <Name>Mr. Johnson</Name>

            <Phone>789 456 1230</Phone>

           <BusinessAddress>

                 <Line1>100 Kasas Street</Line1>

                 <City>Fairfax</City>

                 <Zip>12346</Zip>

                 <State>VA</State>

                 </BusinessAddress>

           </Contact>

</Contacts>

1. Is it possible to count number of <Contact> elements in the XML document

2. Is it possible to check <BillingAddress> element/node exists in a particular <Contact> node.

3. Is there a support for XPATH functions in Boomi AtomSphere.

Outcomes