OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   parsing an XML document with comments

[ Lists Home | Date Index | Thread Index ]
  • From: "Abhishek Srivastava" <abisheks@india.hp.com>
  • To: "xml dev mailing list" <xml-dev@ic.ac.uk>
  • Date: Fri, 19 Nov 1999 14:56:01 +0530

Hi,
 
I have written a program that searches an xml document for a particular element.
The problem is that it uses DOM. DOM will convert all the comments, white spaces etc. etc.
into Nodes thus slowing down my recursive search thru the tree.
 
Is there a way I can "switch off" the creation of these unwanted nodes. I agree that these 
are needed when u want to recreate a document from a dom tree, but that's not what i need !
I only want to "quickly" search an XML document for a particular tag.
 
Another Question : Does SAX also throw an event when it comes across a comment in the doc being parsed ?
 
regards, 
Abhishek.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    _/               Abhishek Srivastava
   _/                Hewlett Packard ISO      
  _/_/_/   _/_/_/    -------------------  
 _/    /   _/   _/     (Work)   +91-80-2251554 x1190
_/  _/   _/_/_/      (Ip)     15.10.47.37           
        _/           (Url)    http://sites.netscape.net/abhishes/index.html                       
       _/           
                     Work like you don't need the money.
                     Dance like no one is watching.
                     And love like you've never been hurt.
                     --Mark Twain                      
                    
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS