Title: Message
to get all attributes for an element at any level:   //element/@*
-----Original Message-----
From: Dave McLean [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 29, 2002 12:45 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [cf-xml] XPATH QUERY

So if I need to take this one step further how do I get all the attributes back for the report or more than one specific attribute?
 
I hope you will have some patience with me, I'm at the bottom of my learning curve on xpath. I've been using the help from the MS XML SDK but its not easy to find simple answers to simple questions.
 
Cheers
 
Dave
-----Original Message-----
From: Blitz, Rob [mailto:[EMAIL PROTECTED]]
Sent: 29 January 2002 15:06
To: '[EMAIL PROTECTED]'
Subject: RE: [cf-xml] XPATH QUERY

Try "//reportGroup[@name="one"]/report/@name"

 

Rob Blitz

Team Leader

Web Application Development Team

RWD Technologies, MIS

410.884.5063 (Office phone)

410.884.2749 (Office fax)

39:12:42.426N 76:51:42.808W (ICBM)

-----Original Message-----
From: Dave McLean [mailto:[EMAIL PROTECTED]]
Sent
: Tuesday, January 29, 2002 9:56 AM
To: '
[EMAIL PROTECTED]'
Subject: [cf-xml] XPATH QUERY

 

Hi,

 

I have an XML file like the one below and I want to write an xpath query to bring back the report names of all the reports in the reportgroup where name = 'one'.

 

If I do //reportGroup[@name='one'] then I get data back for all the reports but only the text data such as that in <FieldList>. All I want is the name attribute for each report.

 

Can anyone help?

 

Thanks

 

Dave

 

<reports>
 <reportGroup name="one">

    <FieldList>f1,f2,f3,f4</FieldList>

...
  <report Name="a">
  </report>

  <report Name="b">

...
  </report>

 </reportGroup>

 <reportGroup name="two">

  <report Name="c">

...
  </report>

 </reportGroup>

</reports>

 

David McLean

Foundation Network Limited

Tel:        +44(0) 870 601 1090

Mobile:   +44(0) 788 162 4338

Mailto:    [EMAIL PROTECTED]

Relay(tm) - Partner Relationships- Managed

 

Reply via email to