Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> DOM vs XML - błędna interpretacja
Cysiaczek
post 12.06.2007, 11:25:32
Post #1





Grupa: Moderatorzy
Postów: 4 465
Pomógł: 137
Dołączył: 26.03.2004
Skąd: Gorzów Wlkp.




Witam.

Mam problem ze zrozumieniem dlaczego DOM inspector z FF interpretuje następujący dokument XML
  1. <?xml version="1.0" encoding="utf8"?>
  2. <root>
  3.      <authorization>
  4.            <authorize>
  5.                  <actionName>authorize</actionName>
  6.                  <userName></userName>
  7.                  <accessLevel>0</accessLevel>
  8.            </authorize>
  9.      
  10.            <form>
  11.                  <actionName>form</actionName>
  12.            </form>
  13.      </authorization>
  14.  
  15.      <unit>
  16.            <replaced>
  17.                  <actionName>replaced</actionName>
  18.                  <txt>I'm unit_replaced</txt>
  19.            </replaced>
  20.            <list>
  21.                  <actionName>list</actionName>
  22.                  <id></id>
  23.                  <comment>nice id tongue.gif</comment>
  24.                  <tablica>
  25.                        <hello>world</hello>
  26.                  </tablica>
  27.            </list>
  28.      </unit>
  29. </root>


w ten sposób
http://img260.imageshack.us/my.php?image=nodesii3.png

Powoduje to, że próba sparsowania dokumentu jest niemożliwa.
Może ktoś pomóc?

Pozdrawiam.


--------------------
To think for yourself you must question authority and
learn how to put yourself in a state of vulnerable, open-mindedness;
chaotic, confused, vulnerability, to inform yourself.
Think for yourself. Question authority.
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
easy
post 15.06.2007, 11:25:27
Post #2





Grupa: Zarejestrowani
Postów: 20
Pomógł: 0
Dołączył: 30.12.2003
Skąd: Lublin

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


Nie wysyłasz nagłówków informujących, że jest to XML, całość jest przetwarzana jako html,
hint:
  1. <?php
  2. header("Content-Type: text/xml");
  3. ?>
Go to the top of the page
+Quote Post
Cysiaczek
post 15.06.2007, 11:36:31
Post #3





Grupa: Moderatorzy
Postów: 4 465
Pomógł: 137
Dołączył: 26.03.2004
Skąd: Gorzów Wlkp.




Dzieki za odpowiedz, owszem to było przyczyną : >

Pozdrawiam


--------------------
To think for yourself you must question authority and
learn how to put yourself in a state of vulnerable, open-mindedness;
chaotic, confused, vulnerability, to inform yourself.
Think for yourself. Question authority.
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 19.08.2025 - 00:22