• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

importing javax.xml

 
Andrew Shafer
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm kinda new to xml programming with Java, so bear with me.
If I import javax.xml.parsers.*, everything loads fine, but if I try to import javax.xml.transform.* it can't be found.
Any ideas? Is there something I need to include in my classpath?
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup. The javax should be a part of your CLASSPATH. Also the .jar files.
If nothing works, try importing only the classes that you need in your program and see if that works.
Eg -
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.Transformer;
Cheers!
------------------
Ajith Kallambella M.
Sun Certified Programmer for the Java�2 Platform.
IBM Certified Developer - XML and Related Technologies, V1.
 
Andrew Shafer
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

thanks Ajith,
What has me confused is it will load the javax.xml.parsers but not the javax.xml.transform. . .any recommendations?
 
aiooua
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Are you sure you are using JAXP1.1. Because JAXP1.0 does not have any transform packages, while it has javax.xml.parsers. See if org.xml.sax.ContentHandler can be included, if you have problems in that as well, then you are surely using JAXP1.0.
Bye.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic