Solved

Read Childobject and specific ID - Xpath Command

Posted on 2013-01-15
2
349 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
[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 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Shredding xml into an oracle 11g Database 2 93
Wordpress Hacked 1 87
Access blocked to XML files other than sitemap.xml? 4 72
XML loaded in a form with dropdown 6 57
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…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The viewer will learn how to dynamically set the form action using jQuery.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

710 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