Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> domxml i ns
deirathe
post
Post #1





Grupa: Zarejestrowani
Postów: 426
Pomógł: 32
Dołączył: 24.05.2007

Ostrzeżenie: (0%)
-----


mam taki kod:
  1. $htm = 
  2. '<?xml version="1.0" ?>
  3. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:tpl="http://someexample.com">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
  6. <title>Untitled Document</title>
  7. </head>
  8.  
  9. <body>
  10. <tpl:value-of select="" />
  11. <tpl:foreach select="">
  12. <tpl:lang href="" />
  13. </tpl:foreach>
  14. </body>
  15. </html>
  16.  
  17.  
  18. ';
  19.  
  20. echo "<pre>";
  21. $tpl = new DOMDocument('1.0');
  22. $tpl->loadXML($htm); 
  23. $elements = $tpl->getElementsByTagName("tpl");
  24. 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
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 3.10.2025 - 08:39