Solved

Read Childobject and specific ID - Xpath Command

Posted on 2013-01-15
2
343 Views
Last Modified: 2013-01-15
Hi Experts,

i'am reading with Xpath the attached XML File:

with this command i get all 3 ID's
//ChildObjects/ObjectType/ObjectList/Object/@*

Open in new window

This is the result:
id="1800"
id="2657"
id="2658"

I'am looking for a command with this result: id="1800".
As second i need a command with this result: id="2657" | id="2658" as resultset.

Do you have any ideas?
xpath.xml
0
Comment
Question by:bounty457
2 Comments
 
LVL 18

Accepted Solution

by:
zc2 earned 500 total points
ID: 38779196
That depends what exactly you want to achieve...

For an instance, this one
//Object[@id="124239"]/ChildObjects/ObjectType/ObjectList/Object/@*
givesyou 1800, and this one
//Object[@id="1800"]/ChildObjects/ObjectType/ObjectList/Object/@*
gives you 2657 and 2658
But there could be many more options.
0
 
LVL 1

Author Comment

by:bounty457
ID: 38779358
Thank you very much for the answer.

Clear, i overlooked the startingpoint:

//Archive/ObjectType/ObjectList/Object/@   ==> id="124239"

And now i get the following fields.


regards Bounty
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

895 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now