| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectxml.dom.MyDomParser2
public class MyDomParser2
JAXP DomParser program. Demonstrates how to parse an xml file using the DOM api and JAXP. This program uses JAXP 1.2.
| Constructor Summary | |
|---|---|
MyDomParser2()
 | 
|
| Method Summary | |
|---|---|
 void | 
addItem(Item item)
Adds a newly created Item object to the DOM Document  | 
 Item | 
createItem()
Creates and returns a new Item object  | 
 org.w3c.dom.Document | 
parse(java.lang.String uri,
      java.io.OutputStream os)
Parses an XML Document  | 
 void | 
toHtml(java.io.File xmlFile,
       java.io.File stylesheet)
Writes a DOM Document to an OutputStream  | 
 void | 
toXml(java.io.OutputStream _out)
 | 
| Methods inherited from class java.lang.Object | 
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public MyDomParser2()
| Method Detail | 
|---|
public org.w3c.dom.Document parse(java.lang.String uri,
                                  java.io.OutputStream os)
                           throws java.lang.Exception
uri - the uri of the xml sourceos - the OutputStream to send the output to
java.lang.Exception - thrown during parsepublic Item createItem()
public void addItem(Item item)
             throws java.lang.Exception
item - the Item object
java.lang.Exception - during parse
public void toHtml(java.io.File xmlFile,
                   java.io.File stylesheet)
            throws java.io.IOException
xmlFile - the output filestylesheet - the stylesheet input for xslt
java.io.IOException - throws exceptions if parse error
public void toXml(java.io.OutputStream _out)
           throws java.lang.Exception
java.lang.Exception
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||