Solved

Xpath Syntax with attribute urgent

Posted on 2004-10-03
7
254 Views
Last Modified: 2011-10-03
Hi
I have the following xml structure  and want to get the xpath

i know PickUp value and Detailinformation value.
i need xmpath syntax to get Addressess node

I have the following xpath but it is not working

/UPS/Summary/SummaryInformation/PickUp[@value=6481802191]/Detail/Detailinformation[@value=1z3011850343710467]/PackageLevel/Addresses
<Main>
          <Summary>
               <SummaryInformation >
               <PickUpRecord >6481802191</PickUpRecord>
               <PickUp value="6481802191">
               <Detail>
                    <Detailinformation value="1z3011850343710467">
                     <Ref2>1233</Ref2>
                          <PackageLevel>
                               <Addresses>
                                    <Address>
                                        <Type>Sender</Type>
                                        <Floor>2n Floor</Floor>
                                        <SuiteNumber>2200</SuiteNumber>
                                        <City>Atlanta</City>
                                        <State>Ga</State>
                                        <Zip>303319</Zip>
                                        <Country>USA</Country>
                                   </Address>
                                   </Addresses>

                         </PackageLevel>
                </Detail>
                </PickUp>
               <NoOfPackages>78446456464</NoOfPackages>
               </SummaryInformation>
               </Summary>
          <Input>
                   
          </Input>
</Main>
0
Comment
Question by:pprasadravi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
7 Comments
 
LVL 15

Accepted Solution

by:
dualsoul earned 250 total points
ID: 12213152
/Main/Summary/SummaryInformation/PickUp[@value=6481802191]/Detail/Detailinformation[@value='1z3011850343710467']/PackageLevel/Addresses

you've forgoten quotes, you are compaing strings in Detaliinformation value.
0
 
LVL 7

Expert Comment

by:J_Mak
ID: 12214797
pprasadravi, in your above example you are missing a </Detailinformation> end tag. Just to let you know. And 'UPS' is used instead of 'Main'. Change it to 'Main'. Other than that, I agree with dualsoul's xpath expression. Cheers.
0
 
LVL 15

Expert Comment

by:dualsoul
ID: 12214958
i think the XML was changed a bit, before posting here due to confidential issues.
0
 

Author Comment

by:pprasadravi
ID: 12217143
issue resolved
0

Featured Post

Stressed Out?

Watch some penguins on the livecam!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question