• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Couldn't access xhtml table using JDOM XPath

 
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have successfully converted a file from HTML to XHTML format (xhtmlDocument) using the Tidy utility. Nevertheless, I am unable to access any nodes below the second table, using either getChildren() method or JDOM XPath navigation .

The content of xhtmlDocument file is as follows:



Below are the relevant codes and their outputs:

( i ) Using getChild()/getChildren() to access the content of the second table returned nothing either:

" target="_blank" rel="nofollow">http://www.w3.org/1999/xhtml]/>][/CODE]
( ii ) Using JDOM XPath to navigate to the second table:

" target="_blank" rel="nofollow">http://www.w3.org/1999/xhtml]/>]][/CODE]
However, I would like to retrieve all the nodes below the second table based on the value of its attributes from the example provided. e.g. id="main-content".

I have posted the same question on http://forums.sun.com/thread.jspa?threadID=5315879&tstart=0

Any suggestion would be appreciated.

Thanks a lot,

Jack
reply
    Bookmark Topic Watch Topic
  • New Topic