jaxp-1.1\examples\DOMEcho\DOMEcho.java makes an error!


XML & Web services: jaxp-1.1\examples\DOMEcho\DOMEcho.java makes an error!

  1. I downloaded jaxp-1.1, and examples\DOMEcho\DOMEcho.java makes errors.

    According to http://java.sun.com/xml/jaxp-1.1/docs/api/index.html,
      org.w3c.dom.Node has getNodeName(), getNodeValue(), getNamespaceURI(),
      getPrefix(), getLocalName() methods.

    - getNodeName(), getNodeValue() are OK.
    - getNamespaceURI(), getPrefix(), getLocalName() make errors. Why?
      cannot resolve symbol: String val = n.getNamespaceURI();
      cannot resolve symbol: val = n.getPrefix();
      cannot resolve symbol: val = n.getLocalName();

  2. this most probably is happening due to package conflicts...

    make sure you have jap.jar, crimson.jar and xalan.jar in you classpath and these should preseed j2ee.jar (if j2ee.jar is present in the class path)
  3. That's it!

    Have a nice day...