Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] IdFunction doesn't work

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Ittay Dror <ittayd AT qlusters.com>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: [XOM-interest] IdFunction doesn't work
  • Date: Sun, 16 Apr 2006 17:12:54 +0300

I'm parsing a document with tagsoup and using jaxen and xom to return an
xpath.

I get an exception because the returned list is empty

my code:
Parser parser = new org.ccil.cowan.tagsoup.Parser(); // tagsoup parser
parser.setFeature(Parser.namespacesFeature, false);

Document doc = new Builder(parser).build("file:///tmp/test.html");
Node node = (Node)(new XOMXPath("id('foo')")).selectNodes(doc).get(0);

my html:
<html>
<head> <title>hello &#187;</title> </head>
<body>
<div id="foo">hello</div>
</body>
</html>


i debugged the code and IdFunction is called, calling
'nav.getElementById(contextNode, id)', which returns null.

please help,
thanks,
ittay

--
===================================
Ittay Dror openQRM Team Leader, R&D, Qlusters Inc.
ittayd AT qlusters.com
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running




Archive powered by MHonArc 2.6.24.

Top of Page