PhpDig.net

What is PhpDig?
PhpDig is a PHP MySQL based
Web Spider & Search Engine.




Domxml Functions


XML document object model (DOM) functions are used to create strings, objects, and trees representing XML documents.The functions can be called as methods of an object or by passing the object to apply the function to; both function prototypes are shown in each function definition. The aliase(s) of the function are noted below, along with any attributes of objects. This extension uses libxml 2.2.7 or greater and can be configured with --with-dom=[dir]. For more information on compiling goto http://www.php.net and look at the user contributed notes for this extension. http://www.xmlsoft.org has more information on the libxml library. The XMLDOM for this extension doesn't expose all the functionality of the libxml API. For the XML DOM specification goto http://www.w3.org/.

Caution

This extension is very new and is subject to change.



Document Object Properties:

Name Type Description
doc object A reference to itself
name string Document name
url string Document URL
version string The version of XML
encoding string Document encoding
standalone long The file is a standalone version. 1=true, -1=false
type long Type of Document
compression long The file is compressed. 1=true, -1=false
charset long character set


Document Object Methods:

Method Equivalent extension function
root domxml_root
add_root domxml_add_root
dumpmem domxml_dumpmem
xpath_init xpath_init
xpath_new_context xpath_new_context
xptr_new_context xptr_new_context


Node Object Properties:

Name Type Description
node object A reference to itself
type long Node type constant
name string The tag name
content string The content of the tag


Node Object Methods:

Methods Equivalent extension function
children domxml_children
new_child domxml_new_child
get_attribute, getattr domxml_get_attribute, domxml_getattr
set_attribute, setattr domxml_set_attribute, domxml_setattr
unlink domxml_unlink_node
node domxml_node


Node type Constants:

Constant Description
XML_ELEMENT_NODE an element node
XML_ATTRIBUTE_NODE an attribute node
XML_TEXT_NODE some text node
XML_CDATA_SECTION_NODE a cdata section node
XML_ENTITY_REF_NODE an enitity reference node
XML_ENTITY_NODE an entity node
XML_PI_NODE a process instruction node
XML_COMMENT_NODE a comment node
XML_DOCUMENT_NODE a document node
XML_DOCUMENT_TYPE_NODE a document type node
XML_DOCUMENT_FRAG_NODE a document fragment node
XML_NOTATION_NODE a notation node
XML_HTML_DOCUMENT_NODE an HTML document node
XML_DTD_NODE a DTD node
XML_ELEMENT_DECL_NODE a element delcaration node
XML_ATTRIBUTE_DECL_NODE an attribute declaration node
XML_ENTITY_DECL_NODE an entity declaration node
XML_NAMESPACE_DECL_NODE a namespace declaration node
XML_GLOBAL_NAMESPACE global namespace
XML_LOCAL_NAMESPACE local namespace


Attribute Type Constants:

Constant Description
XML_ATTRIBUTE_CDATA CDATA attribute
XML_ATTRIBUTE_ID ID attribute
XML_ATTRIBUTE_IDREF IDREF attribute
XML_ATTRIBUTE_IDREFS IDREFS attribute
XML_ATTRIBUTE_ENTITY ENTITY attribute
XML_ATTRIBUTE_NMTOKEN NMTOKEN attribute
XML_ATTRIBUTE_NMTOKENS NMTOKENS attribute
XML_ATTRIBUTE_ENUMERATION ENUMERATION attribute
XML_ATTRIBUTE_NOTATION NOTATION attribute


XPath Type Constants:

Constant Description
XPATH_UNDEFINED undefined data type
XPATH_NODESET An XPath nodeset
XPATH_BOOLEAN boolean data type
XPATH_NUMBER number data type
XPATH_STRING string data type
XPATH_POINT point data type
XPATH_RANGE an XPath range
XPATH_LOCATIONSET an XPath location set
XPATH_USERS XPath users





PHP Functions Essential Reference. Copyright © 2002 by New Riders Publishing (Authors: Zak Greant, Graeme Merrall, Torben Wilson, Brett Michlitsch). This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/). The authors of this book have elected not to choose any options under the OPL. This online book was obtained from http://www.fooassociates.com/phpfer/ and is designed to provide information about the PHP programming language, focusing on PHP version 4.0.4 for the most part. The information is provided on an as-is basis, and no warranty or fitness is implied. All persons and entities shall have neither liability nor responsibility to any person or entity with respect to any loss or damage arising from the information contained in this book.

Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.