Hi,

I think Neko HTML Parser creates a W3C HTML DOM (in org.apache.html.dom) for
the html document. But when I print the class name of the "P" element of a
document I parse, I got the class name "
org.apache.xerces.dom.DeepNodeListImpl" instead of "
org.apache.html.dom.HTMLParagraphElementImpl" that I expected. 

Could someone please tell me if I am missing anything or my assumption is
incorrect?

Thanks.

----------------------------------------------------------------------------
---

// Output of Test code 
document-class-name: org.apache.html.dom.HTMLDocumentImpl
paragraphs: 2
class name org.apache.xerces.dom.DeepNodeListImpl  <--- *****
class name org.apache.xerces.dom.DeepNodeListImpl

//  Test code
DOMParser parser = new DOMParser();
parser.parse(new InputSource(new DebugInputStream(new
FileInputStream("Yahoo!.htm"))));
HTMLDocument doc = (HTMLDocument) parser.getDocument();
                        
System.out.println("document-class-name: " + doc.getClass().getName());
System.out.println("paragraphs: " +
doc.getElementsByTagName("P").getLength());
NodeList n = doc.getElementsByTagName("P");

for (int i = 0; i < n.getLength(); i++) {
        System.out.println("class name " + n.getClass().getName());
}       


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to