| <? | |
| class XMLNode { | |
| var $_node = array(); | |
| function XMLNode($node){ | |
| $this->_node = $node; | |
| } | |
| function setNode($node){ | |
| $this->_node = $node; | |
| } | |
| function getName(){ | |
| return $this->_node['name']; | |
| } | |
| function getContent(){ | |
| return $this->_node['content']; | |
| } | |
| function hasAttributes(){ | |
| if (isset($this->_node['attrs'])) | |
| return 1; | |
| return 0; | |
| } | |
| function getAttribute($attr){ | |
| if (isset($this->_node['attrs'][$attr])) | |
| return $this->_node['attrs'][$attr]; | |
| return ""; | |
| } | |
| } | |
| ?> |