aspose file tools
The moose likes XML and Related Technologies and the fly likes jaxp-1.1 wierdness Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "jaxp-1.1 wierdness" Watch "jaxp-1.1 wierdness" New topic

jaxp-1.1 wierdness

Jeff Gaer
Ranch Hand

Joined: Jun 04, 2001
Posts: 99
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
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

Sun Certified Java Programmer Java 2<P>Jeff Gaer
Jim Yingst

Joined: Jan 30, 2000
Posts: 18671
I'm moving this to the XML forum, where it should have a better chance of being answered.

"I'm not back." - Bill Harding, Twister
subject: jaxp-1.1 wierdness