co2_gaz
Messages postés29Date d'inscriptionsamedi 21 octobre 2006StatutMembreDernière intervention14 septembre 2009
-
14 févr. 2007 à 22:36
co2_gaz
Messages postés29Date d'inscriptionsamedi 21 octobre 2006StatutMembreDernière intervention14 septembre 2009
-
15 févr. 2007 à 20:11
SVP g un pb ke je pe pa réglé je sui obligé d'utilisé DOM, et j'arrive pa a parsé un fichier voila ce ke g
public parseur(String path) throws Throwable, IOException{
//Ce constructeur fait le chargement du document
path="licence.xml";
factory = DocumentBuilderFactory.newInstance();
builder = factory.newDocumentBuilder();
doc = builder.parse(new File(path));
this.nroot = doc.getDocumentElement();
}
et le message ki s'affiche est :
[Fatal Error] licence.xml:1:3: The processing instruction must begin with the name of the target.
org.xml.sax.SAXParseException: The processing instruction must begin with the name of the target.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at parseur.(parseur.java:24)
at parseur.main(parseur.java:50)