Xpath query

how to get an xpath attribute of itself?

Page 1 of 1

0 Replies - 659 Views - Last Post: 09 March 2009 - 02:00 PM Rate Topic: -----

#1 billyp1  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 26-February 09

Xpath query

Posted 09 March 2009 - 02:00 PM


I can't seem to figure out how to get an attribute of a xml object.

Like I have this xml file called pubs.xml which contains

<docIdRef> p6 </docIdRef>

The thing I'm having trouble with is that I want to get the Title of the paper that cited a paper that has a title with the word "dog" in an XPath query

I know that I have to use the docId and the docIdRef, but so far I can only get the papers that has references.

$pubs := doc("pubs.xml");

$pubs//paper[References/docIdRef = //docId]

But can't seem to get how to compare for the references' title?

Any help would be appreciated.


This post has been edited by billyp1: 09 March 2009 - 02:11 PM

Is This A Good Question/Topic? 0
  • +

Page 1 of 1