public class XhtmlDocument extends DOMDocument
Document
for
XHTML documents.Modifier and Type | Field and Description |
---|---|
static int |
XHTML_MATHML
Constant to identify XHTML + MathML documents
|
static int |
XHTML_MATHML_XSL
Constant to identify XHTML + MathML documents using the xsl transformations
from w3c's math working group (http://www.w3.org/Math/XSL/)
|
static int |
XHTML10
Constant to identify XHTML 1.0 strict documents
|
static int |
XHTML11
Constant to identify XHTML 1.1 documents (not used currently)
|
Constructor and Description |
---|
XhtmlDocument(java.lang.String name,
int nType)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
createHeaderFooter() |
org.w3c.dom.Element |
getBodyNode() |
org.w3c.dom.Element |
getContentNode() |
java.lang.String |
getEncoding() |
static java.lang.String |
getExtension(int nType) |
java.lang.String |
getFileExtension()
Returns the file extension of the
Document
represented. |
org.w3c.dom.Element |
getFooterNode() |
org.w3c.dom.Element |
getHeaderNode() |
org.w3c.dom.Element |
getHeadNode() |
org.w3c.dom.Element |
getPanelNode() |
org.w3c.dom.Element |
getTitleNode() |
void |
read(java.io.InputStream is)
Read the Office
Document from the specified
InputStream . |
void |
readFromTemplate(XhtmlDocument template) |
void |
setAddBOM(boolean b) |
void |
setContentDOM(org.w3c.dom.Document doc) |
void |
setContentNode(org.w3c.dom.Element contentNode) |
void |
setEncoding(java.lang.String s) |
void |
setNoDoctype(boolean b) |
void |
setUseNamedEntities(boolean b) |
void |
setXsltPath(java.lang.String s) |
void |
write(java.io.OutputStream os)
Write out content to the supplied
OutputStream . |
getContentDOM, getFileName, getName, initContentDOM, setContentDOM
public static final int XHTML10
public static final int XHTML11
public static final int XHTML_MATHML
public static final int XHTML_MATHML_XSL
public XhtmlDocument(java.lang.String name, int nType)
name
- Document
name.nType
- the type of documentpublic static final java.lang.String getExtension(int nType)
public org.w3c.dom.Element getHeadNode()
public org.w3c.dom.Element getBodyNode()
public org.w3c.dom.Element getTitleNode()
public org.w3c.dom.Element getContentNode()
public void setContentNode(org.w3c.dom.Element contentNode)
public org.w3c.dom.Element getPanelNode()
public org.w3c.dom.Element getHeaderNode()
public org.w3c.dom.Element getFooterNode()
public void createHeaderFooter()
public void setContentDOM(org.w3c.dom.Document doc)
public void read(java.io.InputStream is) throws java.io.IOException
DOMDocument
Document
from the specified
InputStream
.read
in interface Document
read
in class DOMDocument
is
- Office document InputStream
.java.io.IOException
- If any I/O error occurs.public void readFromTemplate(XhtmlDocument template)
public void setEncoding(java.lang.String s)
public java.lang.String getEncoding()
public void setNoDoctype(boolean b)
public void setAddBOM(boolean b)
public void setUseNamedEntities(boolean b)
public void setXsltPath(java.lang.String s)
public java.lang.String getFileExtension()
DOMDocument
Document
represented.getFileExtension
in class DOMDocument
Document
.public void write(java.io.OutputStream os) throws java.io.IOException
OutputStream
.
(with pretty printing)write
in interface OutputFile
write
in class DOMDocument
os
- XML OutputStream
.java.io.IOException
- If any I/O error occurs.