1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
|
<?xml version="1.0" encoding="iso-8859-1"?>
<reference id="ref.domxml">
<title>Funciones de DOM XML</title>
<titleabbrev>DOM XML</titleabbrev>
<partintro>
&warn.experimental;
<simpara>
Estas funciones son disponibles solamente si PHP fué configurado
con <option role="configure">--with-dom=[DIR]</option>, usando al
libreria de XML de GNOME. Usted va a necesitar como mínimo
libxml-2.0.0 (la versión beta no trabajará).
Estas functiones fueron añadidas en PHP4.
</simpara>
<simpara>
Este module define las siguientes constantes:
</simpara>
<table>
<title>Constantes de XML</title>
<tgroup cols="3">
<thead>
<row>
<entry>Constante</entry>
<entry>Valor</entry>
<entry>Descripción</entry>
</row>
</thead>
<tbody>
<row>
<entry>XML_ELEMENT_NODE</entry>
<entry>1</entry>
<entry></entry>
</row>
<row>
<entry>XML_ATTRIBUTE_NODE</entry>
<entry>2</entry>
<entry></entry>
</row>
<row>
<entry>XML_TEXT_NODE</entry>
<entry>3</entry>
<entry></entry>
</row>
<row>
<entry>XML_CDATA_SECTION_NODE</entry>
<entry>4</entry>
<entry></entry>
</row>
<row>
<entry>XML_ENTITY_REF_NODE</entry>
<entry>5</entry>
<entry></entry>
</row>
<row>
<entry>XML_ENTITY_NODE</entry>
<entry>6</entry>
<entry></entry>
</row>
<row>
<entry>XML_PI_NODE</entry>
<entry>7</entry>
<entry></entry>
</row>
<row>
<entry>XML_COMMENT_NODE</entry>
<entry>8</entry>
<entry></entry>
</row>
<row>
<entry>XML_DOCUMENT_NODE</entry>
<entry>9</entry>
<entry></entry>
</row>
<row>
<entry>XML_DOCUMENT_TYPE_NODE</entry>
<entry>10</entry>
<entry></entry>
</row>
<row>
<entry>XML_DOCUMENT_FRAG_NODE</entry>
<entry>11</entry>
<entry></entry>
</row>
<row>
<entry>XML_NOTATION_NODE</entry>
<entry>12</entry>
<entry></entry>
</row>
<row>
<entry>XML_GLOBAL_NAMESPACE</entry>
<entry>1</entry>
<entry></entry>
</row>
<row>
<entry>XML_LOCAL_NAMESPACE</entry>
<entry>2</entry>
<entry></entry>
</row>
</tbody>
</tgroup>
</table>
<simpara>
Este modulo define un número de clases. Las funciones de DOM XML
devuelven un árbol conteniendo la structura del documento XML,
en el cual cada nodo es un objecto perteneciente a una de estas clases.
</simpara>
</partintro>
<!-- class Dom document -->
<!-- has member functions
array root([int doc_handle])
returns array of root nodes of this document. Array
elements are objects of class "Dom node" having properties of
"node" (resource), "type" (long), "name" (string)
and optionally "content" (string).
array children([ int node ])
returns an array of child nodes of this element. Array
elements are objects of class "Dom node" having properties
of "node" (resource), "type" (long), "name" (string)
and optionally "content" (string).
object add_root([int doc_handle,] string name)
Add a root node to document.
returns an object of class "Dom node" having properties
of "node" (resource), "type" (long), "name" (string)
and optionally "content" (string).
object intdtd([int doc_handle])
returns the DTD of document.
returns an object of class "Dtd" having properties
of "dtd" (resource), "sysid" (string), "name" (string)
and optionally "extid" (string).
string dumpmem([int doc_handle])
dumps document into string.
-->
<!-- class Dom node
object lastchild([int node])
returns Dom node object
array children([int node])
as above
object parent([ int node])
returns Dom node object
(parent of this node)
new_child
string getattr([int node,] string attrname)
get value of attribute named attrname
bool setattr([int node,] string attrname, string value)
set value of given attribute.
array attributes([int node])
returns associative array of (string name, string value)
pairs.
object node(string name)
creates a named Dom node object.
-->
<!-- class Dom Attribute
name
-->
<!-- class Dom Namespace
-->
<!-- class Dtd
-->
<refentry id="function.xmldoc">
<refnamediv>
<refname>xmldoc</refname>
<refpurpose>Crea un objecto DOM representando un documento XML</refpurpose>
</refnamediv>
<refsect1>
<title>Descripción</title>
<methodsynopsis>
<type>object</type><methodname>xmldoc</methodname>
<methodparam><type>string</type><parameter>str</parameter></methodparam>
</methodsynopsis>
<para>
Esta función analiza el documento XML contenido en
el texto <parameter>str</parameter> y devuelve un objecto de clase
"Documento Dom", que tiene las propiedades "doc" (resource),
"version" (string) y "typo" (long).
</para>
</refsect1>
</refentry>
<refentry id="function.xmldocfile">
<refnamediv>
<refname>xmldocfile</refname>
<refpurpose>Creat un objecto DOM a partir de un archivo XML</refpurpose>
</refnamediv>
<refsect1>
<title>Descripción</title>
<methodsynopsis>
<type>object</type><methodname>xmldocfile</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
</methodsynopsis>
<para>
Esta función analiza el documento XML contenido en el archivo
referido en <parameter>filename</parameter> y devuelve un objecto de clase
"Documento Dom", que tiene las propiedades "doc" (resource),
"version" (string) y "typo" (long).
<!-- conspiciously the file attribute is missing? -->
</para>
</refsect1>
</refentry>
<refentry id="function.xmltree">
<refnamediv>
<refname>xmltree</refname>
<refpurpose>
Crea un árbol de objectos PHP a partir del un document XML
</refpurpose>
</refnamediv>
<refsect1>
<title>Descripción</title>
<methodsynopsis>
<type>object</type><methodname>xmltree</methodname>
<methodparam><type>string</type><parameter>str</parameter></methodparam>
</methodsynopsis>
<para>
Esta función analiza el documento XML contenido en el texto
<parameter>str</parameter> y devuelve in árbol de objectos
PHP representando el documento analizado.
</para>
</refsect1>
</refentry>
</reference>
<!--
TODO
domxml_root
domxml_add_root
domxml_dumpmem
domxml_attributes
domxml_getattr
domxml_setattr
domxml_children
domxml_new_child
domxml_node
domxml_new_xmldoc alias new_xmldoc
-->
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->
|