Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Functions | Variables
cc_library

Functions

 append_new_attribute (DOMNode &$node, $name, $value=null)
 Adds new attribute. More...
 
 append_new_attribute_ns (DOMNode &$node, $namespace, $name, $value=null)
 Adds new attribute. More...
 
 append_new_element (DOMNode &$parentnode, $name, $value=null)
 Adds new node. More...
 
 append_new_element_ns (DOMNode &$parentnode, $namespace, $name, $value=null)
 Adds new node. More...
 
 append_new_element_ns_cdata (DOMNode &$parentnode, $namespace, $name, $value=null)
 New node with CDATA content. More...
 
 attributeValue ($path, $attrname, $node=null)
 
 create_attribute ($name, $value=null)
 Create new attribute. More...
 
 create_attribute_ns ($namespace, $name, $value=null)
 Create new attribute. More...
 
 fileName ()
 
 filePath ()
 
 load ($fname)
 
 loadHTML ($content)
 
 loadHTMLFile ($fname)
 
 loadString ($content)
 
 loadUrl ($url)
 
 loadXML ($content)
 
 loadXMLFile ($fname)
 
 node ($path, $nd=null, $count=1)
 Enter description here ... More...
 
 nodeList ($path, $node=null)
 Enter description here ... More...
 
 nodeTextValue ($node)
 Get's text value of the node. More...
 
 nodeValue ($path, $node=null, $count=1)
 Get's text value of the node based on xpath query. More...
 
 on_create ()
 
 on_load ()
 
 on_save ()
 
 processPath ()
 
 registerNS ($prefix, $nsuri)
 
 resetXpath ()
 
 save ()
 
 saveTo ($fname)
 
 validate ()
 
 viewXML ()
 

Variables

*< a class="el externalurl" href="http: * * @author Darko Miletic * @author Daniel Muhlrad (daniel.muhlrad@uvcms.com) * @version 1.0 * @copyright 2009 <a class="el externalurl" href="http:*@ingroup cc_library **/require_once( 'gral_lib/cssparser.php');class XMLGenericDocument { private $charset;public DOMDocument $doc=null;protected DOMXPath $dxpath=null;protected $filename;private $filepath;private $isloaded=false;private $arrayPrefixNS=array();private $is_html=false;public static function safexml( $value) { $result=htmlspecialchars(html_entity_decode( $value, ENT_QUOTES, 'UTF-8'), ENT_NOQUOTES, 'UTF-8', false);return $result;} function __construct( $ch='UTF-8', $validatenow=true) { $this-> charset = $ch
 
$this doc validateOnParse = $validatenow
 

Detailed Description

Function Documentation

◆ append_new_attribute()

append_new_attribute ( DOMNode &  $node,
  $name,
  $value = null 
)

Adds new attribute.

Parameters
DOMNode$node
string$name
string$value
Return values
DOMNode

◆ append_new_attribute_ns()

append_new_attribute_ns ( DOMNode &  $node,
  $namespace,
  $name,
  $value = null 
)

Adds new attribute.

Parameters
DOMNode$node
string$namespace
string$name
string$value
Return values
DOMNode

◆ append_new_element()

append_new_element ( DOMNode &  $parentnode,
  $name,
  $value = null 
)

Adds new node.

Parameters
DOMNode$parentnode
string$name
string$value
Return values
DOMNode

◆ append_new_element_ns()

append_new_element_ns ( DOMNode &  $parentnode,
  $namespace,
  $name,
  $value = null 
)

Adds new node.

Parameters
DOMNode$parentnode
string$namespace
string$name
string$value
Return values
DOMNode

◆ append_new_element_ns_cdata()

append_new_element_ns_cdata ( DOMNode &  $parentnode,
  $namespace,
  $name,
  $value = null 
)

New node with CDATA content.

Parameters
DOMNode$parentnode
string$namespace
string$name
string$value

◆ create_attribute()

create_attribute (   $name,
  $value = null 
)

Create new attribute.

Parameters
string$name
string$value
Return values
DOMAttr

◆ create_attribute_ns()

create_attribute_ns (   $namespace,
  $name,
  $value = null 
)

Create new attribute.

Parameters
string$namespace
string$name
string$value
Return values
DOMAttr

◆ node()

node (   $path,
  $nd = null,
  $count = 1 
)

Enter description here ...

Parameters
string$path
DOMNode$nd
int$count
Return values
DOMNode

◆ nodeList()

nodeList (   $path,
  $node = null 
)

Enter description here ...

Parameters
string$path
DOMNode$node
Return values
DOMNodeList

◆ nodeTextValue()

nodeTextValue (   $node)

Get's text value of the node.

Parameters
DOMNode$node
Return values
string

◆ nodeValue()

nodeValue (   $path,
  $node = null,
  $count = 1 
)

Get's text value of the node based on xpath query.

Parameters
string$path
DOMNode$node
int$count
Return values
string