Class DOMParserDemo

java.lang.Object
  |
  +--DOMParserDemo

public class DOMParserDemo
extends java.lang.Object

DOMParserDemo will take an XML file and display the document using DOM.

Version:
1.0

Constructor Summary
DOMParserDemo()
           
 
Method Summary
static void main(java.lang.String[] args)
           This provides a command line entry point for this demo.
 void performDemo(java.lang.String uri)
           This parses the file, and then prints the document out using DOM.
 void printNode(org.w3c.dom.Node node, java.lang.String indent)
           This will print a DOM Node and then recurse on its children.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMParserDemo

public DOMParserDemo()
Method Detail

performDemo

public void performDemo(java.lang.String uri)

This parses the file, and then prints the document out using DOM.

Parameters:
uri - String URI of file to parse.

printNode

public void printNode(org.w3c.dom.Node node,
                      java.lang.String indent)

This will print a DOM Node and then recurse on its children.

Parameters:
node - Node object to print.
indent - String spacing to insert before this Node

main

public static void main(java.lang.String[] args)

This provides a command line entry point for this demo.