Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
Show XML Parsing Flow with sax\DocumentTracer.java
How to show the XML parsing flow with sax\DocumentTracer.java provided in the Apache Xerces package?
✍: FYIcenter
You can show the XML parsing flow with the sax\DocumentTracer.java program
provided in the Apache Xerces package as shown below.
Compile and run sax\DocumentTracer.java program on the sample XML file User.xml:
\fyicenter\xerces-2_11_0\samples>\fyicenter\jdk-1.8.0\bin\javac sax\DocumentTracer.java
Note: sax\DocumentTracer.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
\fyicenter\xerces-2_11_0\samples>\fyicenter\jdk-1.8.0\bin\java
-cp .;..\xercesImpl.jar sax.DocumentTracer User.xml
setDocumentLocator(locator=org.apache.xerces.parsers.AbstractSAXParser$LocatorProxy@69663380)
startDocument()
comment(text=" Copyright (c) 2017 FYIcenter.com ")
startElement(uri="",localName="User",qname="User",attributes={})
characters(text="\n ")
startElement(uri="",localName="ID",qname="ID",attributes={})
characters(text="101")
endElement(uri="",localName="ID",qname="ID")
characters(text="\n ")
startElement(uri="",localName="BirthDate",qname="BirthDate",attributes={})
characters(text="1970-01-01+00:01")
endElement(uri="",localName="BirthDate",qname="BirthDate")
characters(text="\n ")
startElement(uri="",localName="Name",qname="Name",attributes={})
characters(text="Frank Y. Ivy")
endElement(uri="",localName="Name",qname="Name")
characters(text="\n ")
startElement(uri="",localName="Sex",qname="Sex",attributes={})
characters(text=" Male")
endElement(uri="",localName="Sex",qname="Sex")
characters(text="\n")
endElement(uri="",localName="User",qname="User")
endDocument()
⇒ Parsing Flow of XML Document with DTD Declarations
⇐ sax\DocumentTracker.java - Apache Xerves Sax Sample
2017-10-08, ≈35🔥, 0💬
Popular Posts:
layout.jar is a component in iText Java library to provide layout functionalities. iText Java librar...
How to read XML document with DTD validation from socket connections with the socket\DelayedInput.ja.. .
Apache Commons Lang 3 is the 3rd version of Apache Commons Lang, which provides a host of helper uti...
If you are a Java developer, it is very often that you need to use some 3rd party libraries to perfo...
Where to get the Java source code for Connector/J 8.0 User Impl module? Java source code files for C...