Bonjour a tous,
Je débute en GWT et je cherche a parser du XML coté client.
Pour ce faire j'ai été voir du coté de com.google.gwt.xml.client.Document, com.google.gwt.xml.client.Element, et
com.google.gwt.xml.client.XMLParser.
Voici le code que j'ai produit
Donc la je pensai obtenir quelque chose, mais non, impossible de compiler.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 Document doc=XMLParser.parse(xml); Element DocElement=doc.getDocumentElement(); XMLParser.removeWhitespace(docElement); Element ePath=(Element)(docElement.getFirstChild()); String path=ePath.getAttribute("path"); GWT.log(path);
(Vous trouverez l'erreur plus bas)
Avez vous une idée du problème ?
Pourquoi les fonctions ne sont pas trouver ?
Je vous remercie d'avance pour votre aide
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50 Compiling module com.svnGui.SvnGui Validating newly compiled units Ignored 1 unit with compilation errors in first pass. Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors. [ERROR] An internal compiler exception occurred com.google.gwt.dev.jjs.InternalCompilerException: Failed to get JNode at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:140) at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:71) at com.google.gwt.dev.jjs.impl.BuildTypeMap.getType(BuildTypeMap.java:730) at com.google.gwt.dev.jjs.impl.BuildTypeMap.access$000(BuildTypeMap.java:99) at com.google.gwt.dev.jjs.impl.BuildTypeMap$BuildDeclMapVisitor.visit(BuildTypeMap.java:195) at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.traverse(LocalDeclaration.java:237) at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.traverse(MethodDeclaration.java:239) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1239) at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:687) at com.google.gwt.dev.jjs.impl.BuildTypeMap.createPeersForNonTypeDecls(BuildTypeMap.java:637) at com.google.gwt.dev.jjs.impl.BuildTypeMap.exec(BuildTypeMap.java:514) at com.google.gwt.dev.jjs.impl.BuildTypeMap.exec(BuildTypeMap.java:523) at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:599) at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:33) at com.google.gwt.dev.Precompile.precompile(Precompile.java:284) at com.google.gwt.dev.Precompile.precompile(Precompile.java:233) at com.google.gwt.dev.Precompile.precompile(Precompile.java:145) at com.google.gwt.dev.Compiler.run(Compiler.java:232) at com.google.gwt.dev.Compiler.run(Compiler.java:198) at com.google.gwt.dev.Compiler$1.run(Compiler.java:170) at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88) at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82) at com.google.gwt.dev.Compiler.main(Compiler.java:177) [ERROR] <no source info>: public interface com.google.gwt.xml.client.Document extends java.lang.Object implements : Unresolved type com.google.gwt.xml.client.Node /* methods */ [unresolved] public abstract Unresolved type com.google.gwt.xml.client.CDATASection createCDATASection(java.lang.String) [unresolved] public abstract Unresolved type com.google.gwt.xml.client.Comment createComment(java.lang.String) [unresolved] public abstract Unresolved type com.google.gwt.xml.client.DocumentFragment createDocumentFragment() [unresolved] public abstract Unresolved type com.google.gwt.xml.client.Element createElement(java.lang.String) [unresolved] public abstract Unresolved type com.google.gwt.xml.client.ProcessingInstruction createProcessingInstruction(java.lang.String, java.lang.String) [unresolved] public abstract Unresolved type com.google.gwt.xml.client.Text createTextNode(java.lang.String) public abstract com.google.gwt.xml.client.Element getDocumentElement() [unresolved] public abstract Unresolved type com.google.gwt.xml.client.Element getElementById(java.lang.String) [unresolved] public abstract Unresolved type com.google.gwt.xml.client.NodeList getElementsByTagName(java.lang.String) [unresolved] public abstract Unresolved type com.google.gwt.xml.client.Node importNode(Unresolved type com.google.gwt.xml.client.Node, boolean) org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding [ERROR] at GestionClick.java(56): Document doc = XMLParser.parse(xml); org.eclipse.jdt.internal.compiler.ast.LocalDeclaration
Partager