xerces-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@cyberspace.org
Subject HTMLDocument howto,..(urgent)
Date Thu, 11 Apr 2002 11:12:04 GMT


How do we get HTMLDocument for a html, the following doesnt seem to work:

 DOMParser domp = new DOMParser();
 domp.parse(new InputSource(htmlfile));
 Document d = domp.getDocument();
 HTMLDocument hd = (HTMLDocument)d;
 System.out.println ("HTML TITLE: "+hd.getTitle());
 System.out.println ("HTML body: "+ hd.getBody().getNodeValue());

   on the html

   <html>
   <head>
   <title>title text</title>
   </head>
   <body>body text </body>
   </html>


   thanks,st.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Mime
View raw message