Constructor and Description |
---|
XMLBasedDoc() |
XMLBasedDoc(BufferedInputStream inStream)
The preferred way to read XML from a stream.
|
XMLBasedDoc(BufferedReader inReader) |
XMLBasedDoc(File inFile)
The preferred way to read XML from a file.
|
XMLBasedDoc(XMLNode inRootNode) |
Modifier and Type | Method and Description |
---|---|
XMLBasedDoc |
clone() |
Doctype |
getDoctype() |
Charset |
getEncoding() |
String |
getHeader() |
XMLNode |
getRootNode() |
protected XMLTagReader |
getTagReader() |
List<XMLComment> |
getTopLevelComments() |
protected boolean |
isConstructedContent() |
String |
name() |
protected void |
prepareForOutput() |
void |
replaceCharacterEntities() |
XMLBasedDoc |
setDoctype(Doctype inValue) |
XMLBasedDoc |
setEncoding(Charset inValue) |
XMLBasedDoc |
setIsStandalone(boolean inValue) |
XMLBasedDoc |
setName(String inValue) |
void |
setRootNode(XMLNode inRootNode) |
XMLBasedDoc |
setSpec(XMLSpec inValue) |
void |
toIndentedXML(File inFile,
int inInitialIndentLevel,
int inIndentSize)
The preferred way to save XML to a file.
|
String |
toIndentedXML(int inInitialIndentLevel,
int inIndentSize) |
void |
toIndentedXML(OutputStream inStream,
int inInitialIndentLevel,
int inIndentSize)
Writes an indented form of the XML document to the specified OutputStream.
|
void |
toIndentedXML(Writer inWriter,
int inInitialIndentLevel,
int inIndentSize)
Writes an indented form of the XML document to the specified Writer.
|
String |
toXML() |
void |
toXML(File inFile)
The preferred way to save XML to a file.
|
void |
toXML(OutputStream inStream) |
void |
toXML(Writer inWriter)
Writes the XML document to the specified Writer.
|
public XMLBasedDoc()
public XMLBasedDoc(XMLNode inRootNode)
public XMLBasedDoc(File inFile) throws XMLException, IOException
inFile
- The XML file to read.XMLException
IOException
public XMLBasedDoc(BufferedReader inReader)
public XMLBasedDoc(BufferedInputStream inStream)
public XMLBasedDoc setName(String inValue)
public XMLBasedDoc clone()
public XMLBasedDoc setSpec(XMLSpec inValue)
public XMLBasedDoc setEncoding(Charset inValue)
public Charset getEncoding()
public XMLBasedDoc setIsStandalone(boolean inValue)
public XMLBasedDoc setDoctype(Doctype inValue)
public Doctype getDoctype()
public List<XMLComment> getTopLevelComments()
public void setRootNode(XMLNode inRootNode)
public XMLNode getRootNode()
public void toXML(File inFile)
inFile
- the File to which the XML should be writtenpublic void toXML(OutputStream inStream)
public void toXML(Writer inWriter)
public String toIndentedXML(int inInitialIndentLevel, int inIndentSize)
public void toIndentedXML(OutputStream inStream, int inInitialIndentLevel, int inIndentSize)
inStream
- The OutputStream to which the XML will be writteninInitialIndentLevel
- The size of the initial indentinIndentSize
- The number of spaces incremented for ea. indent levelpublic void toIndentedXML(Writer inWriter, int inInitialIndentLevel, int inIndentSize)
public void toIndentedXML(File inFile, int inInitialIndentLevel, int inIndentSize)
inFile
- The target output fileinInitialIndentLevel
- The size of the initial indentinIndentSize
- The number of spaces incremented for ea. indent levelpublic void replaceCharacterEntities()
protected void prepareForOutput()
protected boolean isConstructedContent()
protected XMLTagReader getTagReader()