cvs: pear /DB_Sqlite_Tools/Tools XMLParser.php
| From: | David Costa | Date: | Sun, 05 Sep 2004 16:44:49 +0000 |
| Subject: | cvs: pear /DB_Sqlite_Tools/Tools XMLParser.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-23666@lists.php.net to get a copy of this message | ||
gurugeek Sun Sep 5 12:44:49 2004 EDT
Modified files:
/pear/DB_Sqlite_Tools/Tools XMLParser.php
Log:
Fixed indenting, CS.
http://cvs.php.net/diff.php/pear/DB_Sqlite_Tools/Tools/XMLParser.php?r1=1.2&r2=1.3&ty=u
Index: pear/DB_Sqlite_Tools/Tools/XMLParser.php
diff -u pear/DB_Sqlite_Tools/Tools/XMLParser.php:1.2 pear/DB_Sqlite_Tools/Tools/XMLParser.php:1.3
--- pear/DB_Sqlite_Tools/Tools/XMLParser.php:1.2 Sun Sep 5 12:40:55 2004
+++ pear/DB_Sqlite_Tools/Tools/XMLParser.php Sun Sep 5 12:44:49 2004
@@ -18,7 +18,7 @@
// | Authors: David Costa <gurugeek@php.net> |
// +----------------------------------------------------------------------+
//
-// \$Id: XMLParser.php,v 1.2 2004/09/05 16:40:55 gurugeek Exp $ $
+// \$Id: XMLParser.php,v 1.3 2004/09/05 16:44:49 gurugeek Exp $ $
// more comments will be added soon. Alpha version of the XML parser
@@ -35,7 +35,8 @@
fseek($fh, $pos);
$this->strlen = strlen($this->str);
}
- public function getNextElement() {
+ public function getNextElement()
+ {
// the loop is so that if we are told to ignore a certain
// element, then we can continue on to the next one and
// return that.
@@ -77,22 +78,27 @@
}
return true;
}
- public function ignore($str) {
+ public function ignore($str)
+ {
// add $str to ignore list
$this->ignoreList[] = $str;
}
- public function getElement() {
+ public function getElement()
+ {
return trim($this->element);
}
- public function getEnclosed() {
+ public function getEnclosed()
+ {
return $this->enclosed;
}
- public function getElementAttribute($name) {
+ public function getElementAttribute($name)
+ {
$el = $this->getElement();
preg_match('/[ ]+'.$name.'[ ]*=[ ]*"([^"]*)"/', $el,
$result);
return $result[1];
}
- public function getElementName() {
+ public function getElementName()
+ {
preg_match("/^([^ ]*).*$/", $this->getElement(), $result);
#echo $result[1] ;
return $result[1];