• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What would the xpath statement be to ->

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello all,
This is my xml file:
<?xml version="1.0"?>
<!DOCTYPE book SYSTEM "bookgram.dtd">
<book>
<title>Professional Java Programming</title>
<author>Brett Spell</author>
<publisher>Wrox Press</publisher>
<tableOfContents showPageNumbers="Yes">
<tocEntry>Printing</tocEntry>
<tocEntry>Cut and Paste</tocEntry>
<tocEntry>Drag and Drop</tocEntry>
</tableOfContents>
</book>

I would like to retrieve the value of showpagenumbers
I have this xpath statement but it does not do it:
("/book/tableOfContents[@showPageNumbers]");
I am using XPath API, the above should return an XObject, I then do XObject.toString(), but that does not work.
Please let me know how I can do this.
Thanks,
Rob
 
Rob Bass
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
nevermind I got it
../../@...
 
reply
    Bookmark Topic Watch Topic
  • New Topic