-
Notifications
You must be signed in to change notification settings - Fork 1
/
NiceTree.php
42 lines (30 loc) · 852 Bytes
/
NiceTree.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
#
# $Id$
#
# XML::NiceTree - A namespace aware XML tree with simple XPath-like methods.
#
require_once 'XML/TreeNS.php';
require_once 'XML/NiceTree/NiceNode.php';
class XML_NiceTree extends Xml_TreeNS {
var $base;
function XML_NiceTree($xml, $encoding = null){
$this->node_class = 'XML_NiceTree_NiceNode';
$this->getTreeFromString($xml, $encoding);
$this->base = new XML_NiceTree_NiceNode('FAKE');
$this->base->children = array($this->root);
}
function findMulti($list){
return $this->base->findMulti($list);
}
function findSingle($list){
return $this->base->findSingle($list);
}
function findSingleContent($list){
return $this->base->findSingleContent($list);
}
function findSingleAttribute($list, $attribute){
return $this->base->findSingleAttribute($list, $attribute);
}
}
?>