Download
xml parser n.
Skip this Video
Loading SlideShow in 5 Seconds..
XML Parser PowerPoint Presentation

XML Parser

0 Vues Download Presentation
Télécharger la présentation

XML Parser

- - - - - - - - - - - - - - - - - - - - - - - - - - - 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