From: Denis N. A. <den...@ca...> - 2005-03-24 17:05:18
|
Hi I'm using htmlunit through webtest (<http://webtest.canoo.com>, for those that don't know it). In the present case, Webtest lets htmlunit generate a dom of an html page before querying the document with xpath. For example <verifyxpath xpath="/html/body/h2" text="Resultate"/> makes sure that a h2 header displays the text 'Resultate'. I have the problem that, at some time, the text I want webtest to verify is using html entities: <verifyxpath xpath="/html/body/h2" text="Resultate f&uuml;r das Team 33"/> With the help of Marc, I've found that htmlunit is always generating a dom where all entities have been resolved. nekohtml seems to provide a feature (http://apache.org/xml/features/scanner/notify-builtin-refs) to tell when/where the source contains entities (see description at <http://cvs.apache.org/~andyc/neko/doc/html/settings.html#notify- builtin-html-refs>). Does someone know if it is possible to get a dom tree in which the text nodes contain entitites instead of characters? Does it make sense? Was it already tried? Would it be difficult? dna -- Failure is not an option. It comes bundled with your Microsoft product. -- Ferenc Mantfeld |