$htm = '<?xml version="1.0" ?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:tpl="http://someexample.com"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" /> <title>Untitled Document</title> </head> <body> <tpl:value-of select="" /> <tpl:foreach select=""> <tpl:lang href="" /> </tpl:foreach> </body> </html> '; echo "<pre>"; $tpl = new DOMDocument('1.0'); $tpl->loadXML($htm); $elements = $tpl->getElementsByTagName("tpl"); print_r($elements->item(0));
powinienem otrzymac domnodeelement jednak nie dostaje nic, tzn ze nie znajduje mi tagow tpl;/, wie moze ktos jak to rozwiazac, chce wyciagnac wszystkie tagi tpl z dokumentu.
Dzieki z gory