![](resources/join.gif)
![Home](graphics/ext-2-label-3.jpg)
![](resources/separator.gif)
![Readme](graphics/index-label-3.jpg)
![Release Info](graphics/releases-label-3.jpg)
![](resources/separator.gif)
![Installation](graphics/install-label-3.jpg)
![Download](graphics/ext-18-label-3.jpg)
![Build Instructions](graphics/build-label-3.jpg)
![](resources/separator.gif)
![FAQs](graphics/faqs-label-3.jpg)
![Samples](graphics/samples-label-3.jpg)
![API Docs](graphics/api-label-3.jpg)
![](resources/separator.gif)
![DOM C++ Binding](graphics/ext-68-label-3.jpg)
![Programming](graphics/program-label-3.jpg)
![Migration Guide](graphics/migrate-label-3.jpg)
![](resources/separator.gif)
![Feedback](graphics/feedback-label-3.jpg)
![Bug-Reporting](graphics/bug-report-label-3.jpg)
![PDF Document](graphics/pdf-label-3.jpg)
![](resources/separator.gif)
![CVS Repository](graphics/ext-100-label-3.jpg)
![Mail Archive](graphics/ext-102-label-3.jpg)
![](resources/close.gif)
|
| |
MemParse uses the Validating SAX Parser to parse a memory buffer containing
XML statements, and reports the number of elements and attributes found.
| |
This program uses the SAX Parser to parse a memory buffer
containing XML statements, and reports the number of elements and attributes
found.
The following parameters may be set from the command line
![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) |
Usage:
MemParse [options]
This program uses the SAX Parser to parse a memory buffer
containing XML statements, and reports the number of
elements and attributes found.
Options:
-v=xxx Validation scheme [always | never | auto*].
-n Enable namespace processing. Defaults to off.
-s Enable schema processing. Defaults to off.
-f Enable full schema constraint checking. Defaults to off.
-? Show this help.
* = Default if not provided explicitly.
| ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) |
-v=always will force validation
-v=never will not use any validation
-v=auto will validate if a DOCTYPE declaration or a schema declaration is present in the XML document
Here is a sample output from MemParse
The output is the following:
![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | Finished parsing the memory buffer containing the following XML statements:
<?xml version='1.0' encoding='ascii'?>
<!DOCTYPE company [
<!ELEMENT company (product,category,developedAt)>
<!ELEMENT product (#PCDATA)>
<!ELEMENT category (#PCDATA)>
<!ATTLIST category idea CDATA #IMPLIED>
<!ELEMENT developedAt (#PCDATA)>
]>
<company>
<product>XML4C</product>
<category idea='great'>XML Parsing Tools</category>
<developedAt>
IBM Center for Java Technology, Silicon Valley, Cupertino, CA
</developedAt>
</company>
Parsing took 10 ms (4 elements, 1 attributes, 16 spaces, 95 characters). | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) |
Running MemParse with the validating parser gives a different result because
ignorable white-space is counted separately from regular characters.
The output is the following:
![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | Finished parsing the memory buffer containing the following XML statements:
<?xml version='1.0' encoding='ascii'?>
<!DOCTYPE company [
<!ELEMENT company (product,category,developedAt)>
<!ELEMENT product (#PCDATA)>
<!ELEMENT category (#PCDATA)>
<!ATTLIST category idea CDATA #IMPLIED>
<!ELEMENT developedAt (#PCDATA)>
]>
<company>
<product>XML4C</product>
<category idea='great'>XML Parsing Tools</category>
<developedAt>
IBM Center for Java Technology, Silicon Valley, Cupertino, CA
</developedAt>
</company>
Parsing took 10 ms (4 elements, 1 attributes, 0 spaces, 111 characters). | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) |
Note that the sum of spaces and characters in both versions is the same.
![Note](resources/note.gif) | The time reported by the system may be different, depending on your
processor type. |
|
|
|
|