xml 
[ doc home ] [ class tree: xml ] [ index: xml ] [ all elements ]

Class: IsterXmlNode

Source Location: /IsterXmlNode.php

Class Overview

IsterObject
   |
   --IsterXmlNode

This class represents a generic XML node.


Author(s): Ingo Schramm   

Copyright: Copyright (c) 2005 Ister.ORG Ingo Schramm

Variables

Methods


Child classes:

IsterSimpleXMLElement
This class represents a SimpleXML element.

Inherited Constants

Inherited Variables

Inherited Methods

Class: IsterObject

IsterObject::IsterObject()
Constructor
IsterObject::abstractMethodError()
Report attempt to call an abstract method.
IsterObject::addLogger()
Add an IsterLogger to process log messages.
IsterObject::deleteLogger()
Delete an already registered IsterLogger.
IsterObject::getLoggerNames()
Fetch the names of all currently registered IsterLoggers.
IsterObject::getMem()
Return maximum amount of memory an application has allocated at this point.
IsterObject::log()
Trigger a log message.
IsterObject::passPHPmessage()
Catch PHP E_WARNING and E_NOTICE messages.
IsterObject::serialize()
Serialize the object.
IsterObject::setLogLocal()
Set logging local for the current object.
IsterObject::setupLogger()
Setup a logger.
IsterObject::triggerError()
Alias for log();
IsterObject::unserialize()
Unserialize the object.
IsterObject::__sleep()
Executed prior to serialize().
IsterObject::__wakeup()
Executed prior to unserialize().

Class Details

This class represents a generic XML node.

It may represent a complete document, a document fragment or only a single node of any type such as tag, comment, cdata.


copyright:  Copyright (c) 2005 Ister.ORG Ingo Schramm
author:  Ingo Schramm


[ Top ]


Class Variables

protected mixed $___a attributes
protected mixed $___c children
protected mixed $___l level
protected mixed $___n name (for cdata: content)
protected mixed $___ns namespace
protected mixed $___t type
[ Top ]



Class Methods


constructor IsterXmlNode

IsterXmlNode IsterXmlNode( [integer $type = null], [integer $level = null], [string $name = null], [string $ns = null])

Constructor

Parameters:

integer   $type  
integer   $level  
string   $name  
string   $ns  

[ Top ]

method append

boolean append( object IsterXmlNode $element)

Append an element.

Parameters:

object IsterXmlNode   $element  

[ Top ]

method asXML

string asXML( )

Return the current node formatted as XML.

Note: Since this node only knows of its encoding if it is an ISTER_XML_DOCUMENT, you have to recode it as needed by yourself. The default is to return UTF-8.


[ Top ]

method getChildrenXml

void getChildrenXml( )

access:  protected
[ Top ]

method getRoot

object IsterXmlNode getRoot( )

Get the documents root node if this node represents a document.

Return false on error.


[ Top ]

method hasChildren

integer hasChildren( )

Return number of children.

[ Top ]

method setAttribute

boolean setAttribute( string $name, string $value)

Add or alter an attribute.

Overridden in child classes as:

IsterSimpleXMLElement::setAttribute()
Return an array with all the nodes attributes.

Parameters:

string   $name  
string   $value  

[ Top ]

method toDOM

object IsterDOMObject toDOM( )

[ Top ]

method toSimpleXML

object SimpleXMLElement toSimpleXML( )

Perform conversion of an IsterXmlNode to a SimpleXMLElement.

[ Top ]

method xpath

mixed xpath( )

Runs Xpath query on the node.

Note: currently this function supports only a subset of XPath.


return:  array or object IsterXmlNode
[ Top ]


Documentation generated on Tue, 20 Dec 2005 11:21:39 +0100 by phpDocumentor 1.3.0RC4