how to skip some xml records using XML::SAX parser?



Hello All,

I have some performance issue while using the XML::SAX parser. I have
been using this parser for long time.

The problem is, I have a xml file, say >75 MB to parse. It's taking
hell lot of time to parse it. I don't need some of the xml records to
be parsed based on a particular field.

Each xml record is having 24 fields. On checking the first or third
field in the order of the xml record, i want to skip the parsing for
the remaining of the xml record and jump on to the next xml record. By
any chance, is it possible in XML::SAX parser???? If I can do this, I
would really save a significant amount of time in the process.

Also, let me know if the XML::SAX parser takes the DTD for the xml
document?

I remember that the XML::SAX parser reads the xml file line by line so
that more memory is not used up.

Thanks in anticipation.

Regards,
Uresh

.



Relevant Pages

  • Re: XML PARSER
    ... Taking the data from an XML file and putting it into a database ... > What you us for a parser is really a matter of what environment you plan ... >> I am working on a project where I will be getting a XML file. ...
    (microsoft.public.dotnet.general)
  • Re: Word 2003 XML
    ... In essence the parser determines whether the XML provided to it, ... have much info. about the schemas associated with an XML document. ... (which is what namespaces are all about). ...
    (microsoft.public.mac.office.word)
  • Re: My Regexp XML Parser -> Structured Perl Data, Cut & Paste Version, No Modules (Vol I)
    ... >>>but that's totally useless for XML parsing. ... >Your parser has no appreciation of nesting beyond the very trivial, ... >going to be for your parser to validate against one. ... Wheather or not I can use it to write a schema checker is something I ...
    (comp.lang.perl.misc)
  • Re: SAX PARSING DESIGN PATTERN
    ... I am parsing out an xml document using a sax parser. ... In the class that implements the parser element for a given tag I include a reference to the parent parser element object. ... The parsing loop will retrieve a handler for the current tag during startElement() and set its "parent" instance variable to the current AbstractHandler before pointing currentHandler at the new one. ... Or does your SAX parser actually have StartElementand EndElementmethods? ...
    (comp.lang.java.programmer)
  • [ANN] XSD/e 1.1.0 - validating XML parser generator for embedded systems
    ... I am pleased to announce the availability of CodeSynthesis XSD/e 1.1.0. ... CodeSynthesis XSD/e is an open-source XML ... parser generator for mobile and embedded systems. ...
    (comp.arch.embedded)