1 / 7

XML Parser

XML Parser. Why Need a XML Parser ?. Check XML syntax . ( is well-formed ? ) Validation. ( DTD and XML Schema ) Allow programmatic access to the document’s content. ( SAX 、 DOM 、 … ). SAX vs. DOM.

Télécharger la présentation

XML Parser

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. XML Parser

  2. Why Need a XML Parser ? • Check XML syntax . ( is well-formed ? ) • Validation. ( DTD and XML Schema ) • Allow programmatic access to the document’s content. ( SAX、DOM、… )

  3. SAX vs. DOM • A SAX-based parser processes the document and generates events when tags、text、… are encountered. • A DOM-based parser builds a tree structure containing the XML document’s data in memory.

  4. DOM ( Document Object Model)

  5. DOM ( Document Object Model)

  6. Examples • Creating Nodes. ( BuildXml.java ) • Traversing the DOM. ( TraverseDOM.java )

  7. XML Parser List • Apache Xerces http://xml.apache.org • IBM XML4J http://alphawork.ibm.com/tech/xml4j • Sun Microsystems JAXP http://java.sun.com/xml/ • James Clark XP http://www.jclark.com/xml/xp • Oracle XML Parser http://technet.oracle.com/tech/xml

More Related