DOM3 methods not found 2004-03-02 - By Worapatkitkul, Pairat
HI, I'm trying to compile sample dom DOM3.java coming with beta2-xerces-2.6.2 package for windows because I want to use feature of validating xml doc with xml schema.
I use J2SE1.4.2_03 to compile DOM3.java and I got 2 errors about methods that can not be resolved. I have my classpath pointed to dom3-xml-apis.jar dom3-xercesImpl.jar xercesSamples.jar and I'm sure that it's correct setup.
When I compiled it. I got error about cannot resolve symbol as following:
C:\xerces-2_6_2\samples\dom>C:\j2sdk1.4.2_03\bin\javac DOM3.java DOM3.java:144: cannot resolve symbol symbol : method getDomConfig () location: interface org.w3c.dom.Document config = doc.getDomConfig(); ^ DOM3.java:158: cannot resolve symbol symbol : method normalizeDocument () location: interface org.w3c.dom.Document doc.normalizeDocument(); ^ 2 errors
I tried to compile xerces 2.6.2 src package with target jars-dom3 to get same dom3 jar files to cross check. The testing result was the same. I check Document.java in src package and it includes these methods already and it's available in jar file . Why it 's still can not be resolved?
I never thought that It's depend on JDK version until I tried JDK1.5.0 beta1. When I tried to compile it with J2SE1.5.0 beta 1 . The result is different. These methods can be resolved but I got another 2 errors about method can not be resolved as following:
C:\xerces-2_6_2\samples\dom>javac DOM3.java DOM3.java:113: cannot find symbol symbol : method getDomConfig() location: interface org.w3c.dom.ls.LSParser DOMConfiguration config = builder.getDomConfig(); ^ DOM3.java:165: cannot find symbol symbol : method getDomConfig() location: interface org.w3c.dom.ls.LSSerializer config = domWriter.getDomConfig(); ^ 2 errors
So I look like JDK version affect to compiling result. In JDK 1.5.0 beta1 , it includes new DOM3 methods but I dont' understand why I have method built in jar files and compile it with JDK1.4.2_03 the 2 methods still can not be resolved.? Can anybody explain why this happen and how should I fix these problem?
Thanks very much.
Pairat
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
|
|