Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
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 (309)
Collections:
Other Resources:
sax\Counter.java - Apache Xerves SAX Sample
What is the sax\Counter.java provided in the Apache Xerces package? I have Apache Xerces 2.11.0 installed.
✍: FYIcenter
sax\Counter.java provided in the Apache Xerces package illustrates how to register a SAX2 ContentHandler and receive the callbacks in order to print information about the document. The output of this program shows the time and count of elements, attributes, ignorable whitespaces, and characters appearing in the document.
Here is how to run sax\Counter.java, if you have Apache Xerces 2.11.0 installed:
>\fyicenter\jdk-1.8.0\bin\java -cp \fyicenter\xerces-2_11_0\xercesSamples.jar sax.Counter usage: java sax.Counter (options) uri ... options: -p name Select parser by name. -x number Select number of repetitions. -n | -N Turn on/off namespace processing. -np | -NP Turn on/off namespace prefixes. NOTE: Requires use of -n. -v | -V Turn on/off validation. -s | -S Turn on/off Schema validation support. NOTE: Not supported by all parsers. -f | -F Turn on/off Schema full checking. NOTE: Requires use of -s and not supported by all parsers. -hs | -HS Turn on/off honouring of all schema locations. NOTE: Requires use of -s and not supported by all parsers. -va | -VA Turn on/off validation of schema annotations. NOTE: Requires use of -s and not supported by all parsers. -dv | -DV Turn on/off dynamic validation. NOTE: Not supported by all parsers. -xi | -XI Turn on/off XInclude processing. NOTE: Not supported by all parsers. -xb | -XB Turn on/off base URI fixup during XInclude processing. NOTE: Requires use of -xi and not supported by all parsers. -xl | -XL Turn on/off language fixup during XInclude processing. NOTE: Requires use of -xi and not supported by all parsers. -m | -M Turn on/off memory usage report -t | -T Turn on/off "tagginess" report. --rem text Output user defined comment before next parse. -h This help screen. defaults: Parser: org.apache.xerces.parsers.SAXParser Repetition: 1 Namespaces: on Prefixes: off Validation: off Schema: off Schema full checking: off Honour all schema locations: off Validate annotations: off Dynamic: off XInclude: off XInclude base URI fixup: on XInclude language fixup: on Memory: off Tagginess: off notes: The speed and memory results from this program should NOT be used as the basis of parser performance comparison! Real analytical methods should be used. For better results, perform multiple document parses within the same virtual machine to remove class loading from parse time and memory usage. The "tagginess" measurement gives a rough estimate of the percentage of markup versus content in the XML document. The percent tagginess of a document is equal to the minimum amount of tag characters required for elements, attributes, and processing instructions divided by the total amount of characters (characters, ignorable whitespace, and tag characters) in the document. Not all features are supported by different parsers.
⇒ JAR Files Required to Run sax\Counter.java
⇐ Using Apache Xerces SAX Sample Programs
2017-10-23, 21384🔥, 0💬
Popular Posts:
Apache Commons Codec library provides implementations of common encoders and decoders such as Base64...
JAX-RPC is an API for building Web services and clients that used remote procedure calls (RPC) and X...
commons-collections4-4.4 -sources.jaris the source JAR file for Apache Commons Collections 4.2, whic...
Apache Log4j provides the interface that applications should code to and provides the adapter compon...
Apache Axis2 is the core engine for Web services. It is a complete re-design and re-write of the wid...