|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.strangelight.xml.XML_File
Cleaner interface to the most useful parts of
javax.xml.parsers.*
and org.w3c.dom.*
.
The XML_File object encapsulates both a DOM tree and the file from
which that DOM was constructed.
Most of the time, DOM objects are constructed from XML files, and changes made to those objects are often written back to disk afterwards: but you'd never guess this fact from looking at Sun's APIs, which make these common tasks utterly tortu(r)ous.
Constructor Summary | |
XML_File(java.lang.String fileName)
Constructs an XML_File object given a file name. |
Method Summary | |
void |
commit()
Saves any changes made to the DOM back to the XML source file. |
void |
writeTo(java.io.Writer w)
Writes the current contents of the DOM to a Writer object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XML_File(java.lang.String fileName) throws java.io.IOException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
fileName
- The system-dependent filename.Method Detail |
public void writeTo(java.io.Writer w) throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
public void commit() throws javax.xml.transform.TransformerException, java.io.IOException
javax.xml.transform.TransformerException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |