From: Joel H. <jo...@su...> - 2011-01-15 14:23:31
|
Hi Folks, I'm using neko 1.9.14. Is need to process the comments and nodes in an HTML doc maintaining the order in which they 'appear' in the DOM. Fundamentally I need to be able to output IE fudges in the original HTML, such as: <!--[if lte IE 6]><body class="news ie"><![endif]--> I have set up the same handler I use for processing DOM events, to process comments: parser.setProperty("http://xml.org/sax/properties/lexical-handler", consumer); But I am notified of all the comments first, and then later the DOM nodes (head, body etc...) What I really need to do is process comments and DOM nodes, in order, as they all appear in the doc. Is this even possible? Many thanks Joel PS - question also posted to StackOverflow: http://stackoverflow.com/questions/4699814/processing-xml-comments-using-sax-cyberneko-in-dom-order |