Public Member Functions

Services_Yadis_XMLParser Class Reference

Inheritance diagram for Services_Yadis_XMLParser:
Services_Yadis_dom Services_Yadis_domxml

Public Member Functions

 init ($xml_string, $namespace_map)
 registerNamespace ($prefix, $uri)
 setXML ($xml_string)
 evalXPath ($xpath, $node=null)
 content ($node)
 attributes ($node)

Detailed Description

Definition at line 21 of file XML.php.


Member Function Documentation

attributes ( node  ) 

Return the attributes of a specified node.

Parameters:
mixed $node A node object from a previous call to $this->evalXPath().
Returns:
array $attrs An array mapping attribute names to values.

Reimplemented in Services_Yadis_domxml, and Services_Yadis_dom.

Definition at line 121 of file XML.php.

content ( node  ) 

Return the textual content of a specified node.

Parameters:
mixed $node A node object from a previous call to $this->evalXPath().
Returns:
string $content The content of this node.

Reimplemented in Services_Yadis_domxml, and Services_Yadis_dom.

Definition at line 107 of file XML.php.

evalXPath ( xpath,
node = null 
)

Evaluate an XPath expression and return the resulting node list. This should be overridden by subclasses.

Parameters:
string $xpath The XPath expression to be evaluated.
mixed $node A node object resulting from a previous evalXPath call. This node, if specified, provides the context for the evaluation of this xpath expression.
Returns:
array $node_list An array of matching opaque node objects to be used with other methods of this parser class.

Reimplemented in Services_Yadis_domxml, and Services_Yadis_dom.

Definition at line 94 of file XML.php.

init ( xml_string,
namespace_map 
)

Initialize an instance of Services_Yadis_XMLParser with some XML and namespaces. This SHOULD NOT be overridden by subclasses.

Parameters:
string $xml_string A string of XML to be parsed.
array $namespace_map An array of ($ns_name => $ns_uri) to be registered with the XML parser. May be empty.
Returns:
boolean $result True if the initialization and namespace registration(s) succeeded; false otherwise.

Definition at line 33 of file XML.php.

registerNamespace ( prefix,
uri 
)

Register a namespace with the XML parser. This should be overridden by subclasses.

Parameters:
string $prefix The namespace prefix to appear in XML tag names.
string $uri The namespace URI to be used to identify the namespace in the XML.
Returns:
boolean $result True if the registration succeeded; false otherwise.

Reimplemented in Services_Yadis_domxml, and Services_Yadis_dom.

Definition at line 61 of file XML.php.

setXML ( xml_string  ) 

Set this parser object's XML payload. This should be overridden by subclasses.

Parameters:
string $xml_string The XML string to pass to this object's XML parser.
Returns:
boolean $result True if the initialization succeeded; false otherwise.

Reimplemented in Services_Yadis_domxml, and Services_Yadis_dom.

Definition at line 76 of file XML.php.


The documentation for this class was generated from the following file: