Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Implementation of Common Cartridge library based on {@link http://www.imsglobal.org/cc/ IMS Common Cartridge Standard v1.2}

Author: Darko Miletic
Author: Daniel Muhlrad (daniel.muhlrad@uvcms.com)
Copyright: 2009 {@link http://www.uvcms.com UVCMS e-learning}
Version: 1.0
File Size: 426 lines (12 kb)
Included or required: 5 times
Referenced: 1 time
Includes or requires: 1 file
 backup/cc/cc_lib/gral_lib/cssparser.php

Defines 1 class

XMLGenericDocument:: (36 methods):
  safexml()
  __construct()
  __destruct()
  documentInit()
  viewXML()
  registerNS()
  load()
  loadUrl()
  loadHTML()
  loadXML()
  loadHTMLFile()
  loadXMLFile()
  loadString()
  save()
  saveTo()
  validate()
  attributeValue()
  nodeValue()
  nodeTextValue()
  node()
  nodeList()
  create_attribute_ns()
  create_attribute()
  append_new_element_ns()
  append_new_element_ns_cdata()
  append_new_element()
  append_new_attribute()
  append_new_attribute_ns()
  fileName()
  filePath()
  on_load()
  on_save()
  on_create()
  resetXpath()
  chkxpath()
  processPath()


Class: XMLGenericDocument  - X-Ref

Base XML class

safexml($value)   X-Ref

param: string $value
return: string

__construct($ch = 'UTF-8', $validatenow = true)   X-Ref
No description

__destruct()   X-Ref
No description

documentInit($withonCreate = true)   X-Ref
No description

viewXML()   X-Ref
No description

registerNS($prefix, $nsuri)   X-Ref
No description

load($fname)   X-Ref
No description

loadUrl($url)   X-Ref
No description

loadHTML($content)   X-Ref
No description

loadXML($content)   X-Ref
No description

loadHTMLFile($fname)   X-Ref
No description

loadXMLFile($fname)   X-Ref
No description

loadString($content)   X-Ref
No description

save()   X-Ref
No description

saveTo($fname)   X-Ref
No description

validate()   X-Ref
No description

attributeValue($path, $attrname, $node = null)   X-Ref
No description

nodeValue($path, $node = null, $count = 1)   X-Ref
Get's text value of the node based on xpath query

param: string $path
param: DOMNode $node
param: int $count
return: string

nodeTextValue($node)   X-Ref
Get's text value of the node

param: DOMNode $node
return: string

node($path, $nd = null, $count = 1)   X-Ref
Enter description here ...

param: string $path
param: DOMNode $nd
param: int $count
return: DOMNode

nodeList($path, $node = null)   X-Ref
Enter description here ...

param: string $path
param: DOMNode $node
return: DOMNodeList

create_attribute_ns($namespace, $name, $value = null)   X-Ref
Create new attribute

param: string $namespace
param: string $name
param: string $value
return: DOMAttr

create_attribute($name, $value = null)   X-Ref
Create new attribute

param: string $name
param: string $value
return: DOMAttr

append_new_element_ns(DOMNode &$parentnode, $namespace, $name, $value = null)   X-Ref
Adds new node

param: DOMNode $parentnode
param: string $namespace
param: string $name
param: string $value
return: DOMNode

append_new_element_ns_cdata(DOMNode &$parentnode, $namespace, $name, $value = null)   X-Ref
New node with CDATA content

param: DOMNode $parentnode
param: string $namespace
param: string $name
param: string $value

append_new_element(DOMNode &$parentnode, $name, $value = null)   X-Ref
Adds new node

param: DOMNode $parentnode
param: string $name
param: string $value
return: DOMNode

append_new_attribute(DOMNode &$node, $name, $value = null)   X-Ref
Adds new attribute

param: DOMNode $node
param: string $name
param: string $value
return: DOMNode

append_new_attribute_ns(DOMNode &$node, $namespace, $name, $value = null)   X-Ref
Adds new attribute

param: DOMNode $node
param: string $namespace
param: string $name
param: string $value
return: DOMNode

fileName()   X-Ref
No description

filePath()   X-Ref
No description

on_load()   X-Ref
No description

on_save()   X-Ref
No description

on_create()   X-Ref
No description

resetXpath()   X-Ref
No description

chkxpath()   X-Ref
No description

processPath()   X-Ref
No description