[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: JITTs and DOM
----- Original Message ----- From: "Gavin Thomas Nicol" <gtn@r...> > > I am wondering why there is no API combining Push or Pull with DOM. > > Most DOM parsers have an underlying event parser anyway. > > You could use a SAX filter if the DOM builder can take SAX as input. Well, that is what I usually do - using a SAX parser and building an application specific object hierarchy (not really DOM). It would be convenient, however, if the API standardized this. Example with some Pull API (pseudo-Pascal): ... Parser.Start; while Parser.NextNode do begin Node := Parser.Node; case Node.Type of ntElement: begin if TElement(Node).Name = 'SomeName' then Parser.KeepNode(Node); // this adds the node to the tree end; ntAttribute: ... ntComment: ... end; end; ... Karl
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|