This week's giveaway is in the JDBC forum.
We're giving away four copies of Java Database Connections & Transactions (e-book only) and have Marco Behler on-line!
See this thread for details.
Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

importing javax.xml  RSS feed

 
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?
 
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?
 
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.
 
PI day is 3.14 (march 14th) and is also einstein's birthday. And this is merely a tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!