Update of /cvsroot/phpxd/phpXD
In directory usw-pr-cvs1:/tmp/cvs-serv14918
Modified Files:
README
Log Message:
Index: README
===================================================================
RCS file: /cvsroot/phpxd/phpXD/README,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** README 25 Nov 2001 17:49:36 -0000 1.4
--- README 13 Feb 2002 20:18:35 -0000 1.5
***************
*** 8,27 ****
README
! 0. Preface
! This Readme is only the beginning of a full documentation for
! phpXD. Please read the sources to get a better description of the
! classes and methods of phpXD.
!
! 1. What is phpXD?
!
! phpXD is a XML DOM-Implementation for PHP4 written in PHP. It offers
! methods for accessing the nodes of a XML document using the W3C
! Document Object Model Level 2 Core (DOM).
!
! The differences to the PHP DOM XML functions (only available if
! PHP was configured with --with-dom=[DIR]) are that phpXD
! implements the official W3C DOM (see http://www.w3.org/DOM/) and that
! you do not need to recompile PHP to use phpXD.
2. Requirements
--- 8,17 ----
README
! 1. What is phpXMLDOM?
! phpXMLDOM (phpXD) is an XML DOM-Implementation for PHP written in PHP.
! It offers methods for accessing the nodes of an XML document using the W3C
! Document Object Model Level 2 Core (DOM). phpXMLDOM does not require
! the PHP DOM XML extension.
2. Requirements
***************
*** 30,43 ****
- PHP XML extension (configure PHP using --with-xml)
! 3. Features
! Currently phpXD supports nearly all interfaces of DOM Level 2. Not
! supported are:
! - Entity
! - EntityReference
! DocumentType is still bad implemented, because the DTD of a XML file is not
! parsed. Only name, publicID, systemID and the internalSubset attribute
! are supported. If you load a XML file with a internal DTD and change the node
! tree, phpXD keeps the original DTD if you will save the file.
Because PHP4 doesn't support exceptions, the DOMException interface is
--- 20,35 ----
- PHP XML extension (configure PHP using --with-xml)
! 3. Installation
! - Unpack the files with
! tar -xzf phpxd_x.xx.tar.gz
!
! - Change variable $path in phpXD.php to the home directory of
! phpXMLDOM, for example:
! $path = "/home/thomi/phpXD";
!
! 4. Features
!
! phpXMLDOM supports all interfaces of DOM Level 2 Core.
Because PHP4 doesn't support exceptions, the DOMException interface is
***************
*** 46,75 ****
returns an ExceptionCode.
! 4. Using phpXD
! First, create a phpXD object:
! $dom = new phpXD();
! If you specify a XML file as the first parameter of the constructor,
! the file will be parsed and the DOM tree created:
! $dom = new phpXD("sample.xml");
! You can load a XML file with
! $dom->loadFile("sample.xml");
! To access the DOM tree, use the document attribute, e.g.:
! $list =& $dom->document->getElementsByTagName("hello");
You can get the root node with
! $root =& $dom->document->getDocumentElement();
! Be sure, that you use "=&", if a function returns a DOM object,
because PHP copies all objects with "=", while the "=&" operator saves
a reference. Because the DOM tree is a list of references, only one
"=" could destroy the hierarchy of the tree.
! For more informations about the DOM interfaces see:
! http://www.w3.org/DOM/
! Last but not least, you can save the DOM tree:
! $dom->saveFile("new.xml");
--- 38,81 ----
returns an ExceptionCode.
! 5. Using phpXMLDOM
!
! To read an XML file, create a DOMParser object:
! $parser = new DOMParser();
! You can parse an XML file and create the DOM tree with
! $document =& $parser->parseFile("sample.xml");
! or an XML string with
! $document =& $parser->parse("<hello>1</hello>");
! Both functions have an optional second parameter. You can set it
! "true" if you want to parse the DTD of your XML.
! If the document was succesfully parsed, $document contains the
! implementation of the DOM interface Document.
You can get the root node with
! $root =& $document->getDocumentElement();
! Be sure, that you use "=&" if a function returns a DOM object,
because PHP copies all objects with "=", while the "=&" operator saves
a reference. Because the DOM tree is a list of references, only one
"=" could destroy the hierarchy of the tree.
! For more informations about the DOM interfaces see
! http://www.w3.org/DOM/ or the phpXMLDOM API documentation in the
! directory "doc/".
!
! 6. Homepage, Bugs, Feature Requests
!
! phpXMLDOM is hostet at Sourceforge: http://sf.net/projects/phpxd
!
! For bugs or feature requests, please use
! the Tracker for Bugs at
! http://sourceforge.net/tracker/?group_id=29609&atid=396748&func=browse
!
! or the Tracker for Feature Requests at
! http://sourceforge.net/tracker/?atid=396751&group_id=29609&func=browse
! or send me an email:
! th...@do...
|