- From: Yves Savourel <ysavourel@enlaso.com>
- Date: Thu, 13 Sep 2012 08:21:00 -0600
- To: "'Felix Sasaki'" <fsasaki@w3.org>, "'Phil Ritchie'" <philr@vistatec.ie>
- CC: "'Jirka Kosek'" <jirka@kosek.cz>, <public-multilingualweb-lt@w3.org>
Hi Phil, > Are there any code samples for doing this? > I couldn't find any on the web site. It's quite easy to use the library. Create a HtmlDocumentBuilder object: HtmlDocumentBuilder docBuilder = new HtmlDocumentBuilder(); Then parse the input document: Document doc = docBuilder.parse(new File("myFile.html")); And your DOM tree is in doc. After that it's normal XML DOM handling. If it's any help, the source code for our filter is here: http://code.google.com/p/okapi/source/browse/okapi/filters/its/src/main/java/net/sf/okapi/filters/its/html5/HTML5Filter.java?name=html5 cheers, -yves
Received on Thursday, 13 September 2012 14:21:36 UTC