Login   Register  
PHP Classes
elePHPant
Icontem

File: README

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Bas van Gaalen  >  dom xml class  >  README  >  Download  
File: README
Role: Documentation
Content type: text/plain
Description: Important information
Class: dom xml class
An implementation of the DOM XML standard
Author: By
Last change:
Date: 10 years ago
Size: 3,886 bytes
 

Contents

Class file image Download
phpdomxml-0.8.5 - an XML Document Object Model implementation for PHP 4.10+.
(c) copyright 2002-2003, Bas van Gaalen. All rights reserved.

This library may be distributed under the terms of the LICENSE, which is
included in this package.

phpdomxml does not rely on any external libraries like libxml. It does
however require the expat<tm> extension for PHP.

The methods and properties follow the design as layed out by the World Wide
Web Consorticum and as was implemented in ECMAScript or compatible languages
like Javascript and Actionscript. XML class does not support validating by
DTD through the document type definition. The document type is recorded when
reading an XML document, but not used.

This class is in beta-phase because it's not 100% w3c-compatible. Although
it is a work in progress, this class is production stable for most common
XML needs. I seriously doubt it will ever be 100% w3c standards compliant,
since I see no way of implementing some of the dualities as documented in
their standards. But I don't claim to be an expert, so if you find a way to
provide more standards compliant functionality, then feel free to do so.
But please, send a copy of the new source code to me.

Please send comments, questions or suggestions to bas-at-webtweakers-dot-com.

-----------------------------------------------------------------------------

IMPORTANT NOTE:

Please note that the behavior of createElement has changed. Version 0.8 had a
bug where the createElement would automatically attach the created element as
firstChild node - overwriting a possible node already there. Obviously this
behavior is not compliant with the specifications and thus now corrected.

The correct behavior for createElement is to create the requested element and
return it to the caller. It then can be appended, inserted or replaplaced into
another node. Be ware that this change has an impact on scripts already build
with this class! The correct behavior of createElement is demonstrated in the
example files - as in numerous online documentations.

-----------------------------------------------------------------------------

DOCUMENTATION NOTE:

I am not quite fond of writing lengthy documentation, as probably most
developers: it distracts from the work that needs to be done. ;-) But in this
case I am in a luxery position: there are numerous documentations and examples
on the internet available on how to implement DOM-compliant code. A nice and
simple one can be found here: http://www.w3schools.com/dom/dom_node.asp
I will add my own documentation later on.

-----------------------------------------------------------------------------

LIST OF IMPLEMENTED OBJECTS, METHODS AND PROPERTIES:

Objects:
	XML
	XMLNode
	XMLText

Methods:
	sendAndLoad
	send
	load
	parseXML
	toString
	hasChildNodes
	createTextNode
	createElement
	appendChild

Properties:
	attributes
	childNodes
	firstChild
	lastChild
	previousSibling
	nextSibling
	nodeName
	parentNode
	nodeType
	status
	error
	version
	encoding
	contentType
	docTypeDecl
	xmlDecl

-----------------------------------------------------------------------------

LIST OF METHODS THAT STILL NEED TO BE IMPLEMENTED:

Methods:
	insertBefore
	removeChild
	replaceChild
	more...

-----------------------------------------------------------------------------

FILES IN THIS PACKAGE:

CHANGES
	Changes, updates and fixes from first release till current release.

LICENSE
	A short license in BSD style.

README
	This file.

functest.php
	A functionality test case as well as an example script for most - all -
	functions of the XML class.

lib.xml.inc.php
	The DOM XML Class/library itself.

server.php
	A simple server script, used in the examples.

test4.xml
test5.xml
	Two simple XML files, used in the examples.

-----------------------------------------------------------------------------