Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Read Childobject and specific ID - Xpath Command

Posted on 2013-01-15
2
Medium Priority
?
362 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 19

Accepted Solution

by:
zc2 earned 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

916 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