public class OfficeDocument
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
CONTENTXML |
protected static java.lang.String |
STYLESXML |
| Constructor and Description |
|---|
OfficeDocument() |
| Modifier and Type | Method and Description |
|---|---|
org.w3c.dom.Document |
getContentDOM()
Return a DOM
Document object of the content.xml file. |
EmbeddedObject |
getEmbeddedObject(java.lang.String sName)
Returns the embedded object corresponding to the name provided.
|
org.w3c.dom.Document |
getMetaDOM()
Return a DOM
Document object of the meta.xml
file. |
org.w3c.dom.Document |
getStyleDOM()
Return a DOM
Document object of the style.xml file. |
boolean |
isPackageFormat()
Package or flat format?
|
void |
read(org.w3c.dom.Document dom)
Read the document from a DOM tree (flat XML format)
|
void |
read(java.io.InputStream is)
Read the Office
Document from the given
InputStream. |
protected void |
removeEmbeddedObject(java.lang.String sName) |
protected static final java.lang.String CONTENTXML
protected static final java.lang.String STYLESXML
public boolean isPackageFormat()
public org.w3c.dom.Document getContentDOM()
Document object of the content.xml file.
file. Note that a content DOM is not created when the constructor
is called, but only after the read method has been invokedDocument object.public org.w3c.dom.Document getMetaDOM()
Document object of the meta.xml
file. Note that a meta DOM is not created when the constructor
is called, but only after the read method has been invokedDocument object.public org.w3c.dom.Document getStyleDOM()
Document object of the style.xml file.
Note that a style DOM is not created when the constructor
is called, but only after the read method has been invokedDocument object.public EmbeddedObject getEmbeddedObject(java.lang.String sName)
sName - The name of the embedded object to retrieve.EmbeddedObject instance representing the named
object.protected void removeEmbeddedObject(java.lang.String sName)
public void read(org.w3c.dom.Document dom)
dom - the DOM treepublic void read(java.io.InputStream is)
throws java.io.IOException
Document from the given
InputStream.
Performs simple type detection to determine package or flat formatis - Office document InputStream.java.io.IOException - If any I/O error occurs.org.xml.sax.SAXException