Zeta Components Manual :: Docs For Class ezcDocumentXmlBase
Document::ezcDocumentXmlBase
Class ezcDocumentXmlBase
A base class for XML based document type handlers.
Source for this file: /Document/src/document/xml_base.php
Implements interfaces:
ezcDocument | --ezcDocumentXmlBase
Version: | //autogen// |
Descendants
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. |
Member Variables
protected DOMDocument |
$document
DOM tree as the internal representation for the loaded XML. |
Inherited Member Variables
From ezcDocument | |
---|---|
protected |
ezcDocument::$errors
|
protected |
ezcDocument::$options
|
protected |
ezcDocument::$path
|
Method Summary
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 |
Inherited Methods
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 |
Methods
getDomDocument
Get DOMDocument
Directly return the internally stored DOMDocument object, to spare additional XML parsing overhead.
loadDomDocument
Construct directly from DOMDocument
To save execution time this method offers the construction of XML documents directly from a DOM document instance.
Parameters:
Name | Type | Description |
---|---|---|
$document |
DOMDocument |
loadString
Create document from input string
Create a document of the current type handler class and parse it into a usable internal structure.
Parameters:
Name | Type | Description |
---|---|---|
$string |
string |
Redefinition of:
Method | Description |
---|---|
ezcDocument::loadString() |
Create document from input string |
Redefined in descendants as:
Method | Description |
---|---|
ezcDocumentXhtml::loadString() |
Create document from input string |
ezcDocumentOdt::loadString() |
Create document from input string. |
save
Return document as string
Serialize the document to a string an return it.
Redefinition of:
Method | Description |
---|---|
ezcDocument::save() |
Return document as string |
Redefined in descendants as:
Method | Description |
---|---|
ezcDocumentXhtml::save() |
Return document as string |
ezcDocumentOdt::save() |
Return document as string |
ezcDocumentDocbook::save() |
Return document as string |
setDomDocument
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.
Parameters:
Name | Type | Description |
---|---|---|
$document |
DOMDocument |