Table 7. DomAttribute class (DomAttribute
: DomNode)
Method name Remark
name DomAttribute_name()
value DomAttribute_value()
specified DomAttribute_specified()
Table 8. DomProcessingInstruction class (DomProcessingInstruction
: DomNode)
Method name Function name Remark
target DomProcessingInstruction_target()
data DomProcessingInstruction_data()
Table 9. Parser class
Method name Function name Remark
add_chunk Parser_add_chunk()
end Parser_end()
Table 10. XPathContext class
Method name Function name Remark
eval XPathContext_eval()
eval_expression XPathContext_eval_expression()
register_ns XPathContext_register_ns()
Table 11. DomDocumentType class (DomDocumentType : DomNode)
Method name Function name Remark
name DomDocumentType_name()
entities DomDocumentType_entities()
notations DomDocumentType_notations()
public_id DomDocumentType_public_id()
system_id DomDocumentType_system_id()
internal_subset DomDocumentType_internal_subset()
The classes DomDtd is derived from DomNode. DomComment is
derived from DomCData.
Examples
Many examples in this reference require an XML string. Instead
of repeating this string in every example, it will be put
into a file which will be included by each example. This
include file is shown in the following example section.
Alternatively, you could create an XML document and read
it with DomDocument_open_file().
Example 1. Include file example.inc with XML string
<?php
$xmlstr = "<?xml version='1.0' standalone='yes'?>
<!DOCTYPE chapter SYSTEM '/share/sgml/Norman_Walsh/db3xml10/db3xml10.dtd'
[ <!ENTITY sp \"spanish\">
]>
<!-- lsfj -->
<chapter language='en'><title language='en'>Title</title>
<para language='ge'>
&sp;
<!-- comment -->
<informaltable ID='findme' language='&sp;'>
<tgroup cols='3'>
<tbody>
<row><entry>a1</entry><entry
morerows='1'>b1</entry><entry>c1</entry></row>
<row><entry>a2</entry><entry>c2</entry></row>
<row><entry>a3</entry><entry>b3</entry><entry>c3</entry></row>
</tbody>
</tgroup>
</informaltable>
</para>
</chapter>";
?>
|