Solved

Read Childobject and specific ID - Xpath Command

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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
XSLT list item selection criteria not working 12 34
XSL FO - text wrapping and empty spaces 1 38
XML XSLT If loop 4 29
Xsl-fo show PDF when no results are returned 2 20
Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

839 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