File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes Couldn't access xhtml table using JDOM XPath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Couldn Watch "Couldn New topic
Author

Couldn't access xhtml table using JDOM XPath

Jack Bush
Ranch Hand

Joined: Oct 20, 2006
Posts: 235
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Couldn't access xhtml table using JDOM XPath
 
Similar Threads
XSLT stylesheet looping through the same node (recursion?)
Read data to the xml file from the database?
XSLT Stylesheet test for special character
XSLT StyleSheet Query (newbie)
How to parse XML document with default namespace with JDOM XPath