fixed xpath parsing to allow for / character in namespace (for instance: '{http://etherx.jabber.org/streams}features' )
git-svn-id: svn://netflint.net/xmpphp@62 ef36c318-a008-4979-b6e8-6b496270793b
This commit is contained in:
parent
6860070b7e
commit
f1088f8174
@ -253,7 +253,12 @@ class XMPPHP_XMLStream {
|
||||
* @param
|
||||
*/
|
||||
public function addXPathHandler($xpath, $pointer, $obj = null) {
|
||||
foreach(split("/", $xpath) as $ns_tag) {
|
||||
if (preg_match_all("/\(?{[^\}]+}\)?(\/?)[^\/]+/", $xpath, $regs)) {
|
||||
$ns_tags = $regs[0];
|
||||
} else {
|
||||
$ns_tags = array($xpath);
|
||||
}
|
||||
foreach($ns_tags as $ns_tag) {
|
||||
list($l, $r) = split("}", $ns_tag);
|
||||
if ($r != null) {
|
||||
$xpart = array(substr($l, 1), $r);
|
||||
|
Loading…
Reference in New Issue
Block a user