tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: [5.0.27] org.w3c.dom.Document.getElementById() not working - worked with Resin-2.11
Date Mon, 26 Jul 2004 12:54:58 GMT
Hi,
This might be a stupid question, but are you sure there's an element
whose ID is "content" ?

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: Jens Ansorg [mailto:liste@ja-web.de]
>Sent: Monday, July 26, 2004 8:48 AM
>To: tomcat-user@jakarta.apache.org
>Subject: [5.0.27] org.w3c.dom.Document.getElementById() not working -
>worked with Resin-2.11
>
>hi,
>
>I have a class that reads XHTML files and deals with them as dom
document.
>    javax.xml.parsers.DocumentBuilderFactory factory =
>DocumentBuilderFactory.newInstance();
>    javax.xml.parsers.DocumentBuilder builder =
>factory.newDocumentBuilder();
>    org.w3c.dom.Document doc = builder.parse(new File(getUrl()));
>
>
>one method tries to get a certain element in this dom
>    org.w3c.dom.Element contentElement = doc.getElementById("content");
>
>unfortunately this code fails, contentElement is always null.
>
>
>another method grabs all Anchors and deals with them
>    org.w3c.dom.NodeList links = doc.getElementsByTagName("a");
>    for (int i = 0; i < links.getLength(); i++)
>    {
>        org.w3c.dom.Node link = links.item(i);
>        //... do something useful ...
>    }
>
>this code works!
>
>
>
>the class runs fine on a Resin Server but fails on Tomcat 5.0.27
>
>
>
>any ideas how to get this working on tomcat?
>
>
>thanks
>Jens
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message