pb de validation d'un doc xml
Bonjour,
j'ai une dtd très basic
Code:
1 2 3 4 5 6
| <!ELEMENT TREENODES (treenode*)>
<!ELEMENT treenode (treenode*)>
<!ATTLIST treenode
Text (#PCDATA) #REQUIRED
Level (#PCDATA) #REQUIRED
NodeData (#PCDATA) #REQUIRED> |
mon fichier xml est le suivant
Code:
1 2 3 4 5 6 7 8 9
|
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE TreeView SYSTEM "../temp/TreeView.dtd">
<!--Fichier qui contient le treeview des causes-->
<TREENODES>
<treenode Text="Exploitation" Level="0" NodeData="1;-2147483648" />
<treenode Text="Arrêt induit" Level="0" NodeData="2;-2147483648" />
<treenode Text="Maintenance programmée" Level="0" NodeData="3;-2147483648" />
<TREENODES> |
au moment du parsing je recois l'erreur suivante:
System.Xml.XmlException: This is an unexpected token.
The expected token is 'NAME'. Line 4, position 11.
alors que je n'ai null part déclaré NAME...
merci
Re: pb de validation d'un doc xml
Citation:
Envoyé par linux
Bonjour,
Code:
1 2 3 4 5 6 7 8 9
|
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE TreeView SYSTEM "../temp/TreeView.dtd">
<!--Fichier qui contient le treeview des causes-->
<TREENODES>
<treenode Text="Exploitation" Level="0" NodeData="1;-2147483648" />
<treenode Text="Arrêt induit" Level="0" NodeData="2;-2147483648" />
<treenode Text="Maintenance programmée" Level="0" NodeData="3;-2147483648" />
<TREENODES> |
Salut,
Fais attention aussi je sais pas si c'est une erreur de frappe ou un problème dans ton fichier XML mais tu n'a pas de balise fermante de TREENODES
++