• Post Reply Bookmark Topic Watch Topic
  • New Topic

jaxp-1.1 wierdness  RSS feed

Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
org.w3c.dom.Node class is supposed to be expanded in jaxp-1.1. to have a method setPrefix(String s) among other things. However when I try to reference that method using jdk1.3.1 and with the three jaxp1.1 jar files in my classpath ( and nothing else other than '.'. I get
Method setPrefix(java.lang.String) not found in interface org.w3c.dom.Node
Inspecting with javap sure enough there is no setPrefix method. However if I import the jar files ( either the crimson.jar or the xalan.jar both have the w3c interfaces), I see that the method is defined. So I have the curous situation where visual age seems to work but the sun jdk does not ( i know thats not likely).
I suspect that the w3c classes must be coming from 'somewhere' else, but I have no idea why. Code compiled in visualage does run fine under tomcat, but I can not compile with the sun jdk because of this.
javap -classpath c:\jaxp-1.1\crimson.jar org.w3c.dom.Node
Compiled from Node.java
public interface org.w3c.dom.Node
/* ACC_SUPER bit NOT set */
public static final short ELEMENT_NODE;
public static final short ATTRIBUTE_NODE;
public static final short TEXT_NODE;
public static final short CDATA_SECTION_NODE;
public static final short ENTITY_REFERENCE_NODE;
public static final short ENTITY_NODE;
public static final short PROCESSING_INSTRUCTION_NODE;
public static final short COMMENT_NODE;
public static final short DOCUMENT_NODE;
public static final short DOCUMENT_TYPE_NODE;
public static final short DOCUMENT_FRAGMENT_NODE;
public static final short NOTATION_NODE;
public abstract org.w3c.dom.Node appendChild(org.w3c.dom.Node) throws org.w3c.dom.DOMExcepti
public abstract org.w3c.dom.Node cloneNode(boolean);
public abstract org.w3c.dom.NamedNodeMap getAttributes();
public abstract org.w3c.dom.NodeList getChildNodes();
public abstract org.w3c.dom.Node getFirstChild();
public abstract org.w3c.dom.Node getLastChild();
public abstract org.w3c.dom.Node getNextSibling();
public abstract java.lang.String getNodeName();
public abstract short getNodeType();
public abstract java.lang.String getNodeValue() throws org.w3c.dom.DOMException;
public abstract org.w3c.dom.Document getOwnerDocument();
public abstract org.w3c.dom.Node getParentNode();
public abstract org.w3c.dom.Node getPreviousSibling();
public abstract boolean hasChildNodes();
public abstract org.w3c.dom.Node insertBefore(org.w3c.dom.Node, org.w3c.dom.Node) throws org
public abstract org.w3c.dom.Node removeChild(org.w3c.dom.Node) throws org.w3c.dom.DOMExcepti
public abstract org.w3c.dom.Node replaceChild(org.w3c.dom.Node, org.w3c.dom.Node) throws org
public abstract void setNodeValue(java.lang.String) throws org.w3c.dom.DOMException;

Thanks in advance for any help
Jeff Gaer
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm moving this to the XML forum, where it should have a better chance of being answered.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!