Syntaxe fichier XML

cs_Rom1S Messages postés 2 Date d'inscription vendredi 13 juin 2008 Statut Membre Dernière intervention 11 août 2008 - 30 juin 2008 à 09:21
cs_laurent1024 Messages postés 987 Date d'inscription mardi 31 mai 2005 Statut Membre Dernière intervention 30 août 2012 - 30 juin 2008 à 10:23
Salut,
Je suis novice en programmation, mon but dans un premier temps est d'établir une liste de fichiers  XML, pour ensuite les parser (grâce à Xerces probablement, sous Eclipse).


Le premier problème est probablement bête, mais mon erreur est celle-ci :
                                       The processing instruction must begin with the name of the target (line 1)



Voici mon début de fichier:





? XML version="1.0" encoding="UTF-8" ?>


<VS4ipGPS>


<MIB's identifier>20</MIB's identifier>


<OID>1


<type name="VS4ipGPSHardwareConfig">


integer(nodetection(0),internal(1))


<status>current</status>


<max-access>read_only</max-access>


<--!This variable indicates if internal GPS hardware has been detected-->


</type>


</OID>

Quelqu'un pourrait-il m'aider? Je pense bien que le début de mon fichier est incomplet, mais je ne sais pas quelle syntaxe utiliser pour un début de fichier XML...probablement quqch de spécifique.
Merci.

1 réponse

cs_laurent1024 Messages postés 987 Date d'inscription mardi 31 mai 2005 Statut Membre Dernière intervention 30 août 2012 25
30 juin 2008 à 10:23
? XML version="1.0" encoding="UTF-8" ?> <== il manque un <


<VS4ipGPS>


<MIB's identifier>20</MIB's identifier> <== MIB"s identifier ne doit pas être un nom de balise autorisé


<OID>1


<type name="VS4ipGPSHardwareConfig">


integer(nodetection(0),internal(1))


<status>current</status>


<max-access>read_only</max-access>
0
Rejoignez-nous