Posted on 2006-05-02
Last Modified: 2013-11-23
Difference between domparser and saxparser.

could you explain the mechanism include in domparser
Question by:stmani2005
    LVL 11

    Assisted Solution

    LVL 30

    Assisted Solution

    A Sax parser will give you better performance than a DOM parser. DOM will load the entire object into memory and will give you easier API access/ control to the tree (adding/ removing nodes is simpler).
    LVL 3

    Accepted Solution


    * The DOMParser parses an XML document and creates an inmemory Object representation for the whole XML as a DOM object.
    * The SAXParser reads the XML file and as it reads, as it reads, it searches for registered callback funtions (which are written by the user) so that as the parser encounters a particular tag/element etc. while reading, those corresponding callback functions are fired.

    as u can see, DOM is more memory intensive, but its more flexible/easier to use..



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Suggested Solutions

    Title # Comments Views Activity
    classnotfoundexception 3 28
    Python Encoding Problem \u2013 4 56
    IT Company 5 54
    array6 challenfge 6 48
    If you haven’t already, I encourage you to read the first article ( in my series to gain a basic foundation of R and R Studio.  You will also find the …
    Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
    This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
    The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now