xml - X-Path Query issues -


my xml dtd follows:

<!doctype bookstore [ <!element bookstore (book | magazine)*> <!element book (title, authors, remark?)> <!attlist book isbn cdata #required               price cdata #required               edition cdata #required> <!element magazine (title)> <!attlist magazine month cdata #required year cdata #required>  <!element title (#pcdata)> <!element authors (author+)> <!element remark (#pcdata)> <!element author (first_name, last_name)> <!element first_name (#pcdata)> <!element last_name (#pcdata)> ]> 

i want run following query:

title book title same title of magazine. 

i cant think way run query.anyone please me b thanksful.

you try :

//bookstore/book/title[. = //magazine/title] 

above xpath returns <title> elements child of <book> , has value equals @ least 1 <title> of <magazine>.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -