A base class for XML based document type handlers.
Source for this file: /Document/src/document/xml_base.php
ezcDocument | --ezcDocumentXmlBase
Version: | //autogen// |
Child Class | Description |
---|---|
ezcDocumentXhtml | The document handler for XHTML document markup. |
ezcDocumentOdt | The document handler for Open Document Text (ODT) documents. |
ezcDocumentEzXml | The document handler for the eZ Publish 3 XML document markup. |
ezcDocumentDocbook | The document handler for the docbook document markup. |
protected DOMDocument |
$document
DOM tree as the internal representation for the loaded XML. |
From ezcDocument | |
---|---|
protected |
ezcDocument::$errors
|
protected |
ezcDocument::$options
|
protected |
ezcDocument::$path
|
public DOMDocument |
getDomDocument(
)
Get DOMDocument |
public void |
loadDomDocument(
$document
)
Construct directly from DOMDocument |
public void |
loadString(
$string
)
Create document from input string |
public string |
save(
)
Return document as string |
public void |
setDomDocument(
$document
)
Set DOMDocument |
From ezcDocument | |
---|---|
public ezcDocument |
ezcDocument::__construct()
Construct new document |
public abstract void |
ezcDocument::createFromDocbook()
Create document from docbook document |
public abstract ezcDocumentDocbook |
ezcDocument::getAsDocbook()
Return document compiled to the docbook format |
public array |
ezcDocument::getErrors()
Return list of errors occured during visiting the document. |
public string |
ezcDocument::getPath()
Get document base path |
public void |
ezcDocument::loadFile()
Create document from file |
public abstract void |
ezcDocument::loadString()
Create document from input string |
public abstract string |
ezcDocument::save()
Return document as string |
public void |
ezcDocument::setPath()
Set document base path |
public void |
ezcDocument::triggerError()
Trigger visitor error |
Get DOMDocument
Directly return the internally stored DOMDocument object, to spare additional XML parsing overhead.
Construct directly from DOMDocument
To save execution time this method offers the construction of XML documents directly from a DOM document instance.
Name | Type | Description |
---|---|---|
$document |
DOMDocument |
Create document from input string
Create a document of the current type handler class and parse it into a usable internal structure.
Name | Type | Description |
---|---|---|
$string |
string |
Method | Description |
---|---|
ezcDocument::loadString() |
Create document from input string |
Method | Description |
---|---|
ezcDocumentXhtml::loadString() |
Create document from input string |
ezcDocumentOdt::loadString() |
Create document from input string. |
Return document as string
Serialize the document to a string an return it.
Method | Description |
---|---|
ezcDocument::save() |
Return document as string |
Method | Description |
---|---|
ezcDocumentXhtml::save() |
Return document as string |
ezcDocumentOdt::save() |
Return document as string |
ezcDocumentDocbook::save() |
Return document as string |
Set DOMDocument
Directly set the internally stored DOMDocument object, to spare additional XML parsing overhead. Setting a broken or invalid docbook document is not checked here, ebcause validation would cost too much performace on each set. Be careful what you set here, invalid documents may lead to unpredictable errors.
Name | Type | Description |
---|---|---|
$document |
DOMDocument |