aspose file tools*
The moose likes XML and Related Technologies and the fly likes error while trying to import 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 "error while trying to import" Watch "error while trying to import" New topic
Author

error while trying to import

Hari priya
Ranch Hand

Joined: Mar 11, 2004
Posts: 134
Hi all-
I was trying to import com.sun.xml.tree.XmlDocument to my java code but it gives me error.
I guess, com.* packages are not a part of jaxp. Is there aything that I should do like setting the classpath ?
Thanks
Radha
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
May I ask why are you importing stuff from com.sun.* ?


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Hari priya
Ranch Hand

Joined: Mar 11, 2004
Posts: 134
Hi Lasee -
I was trying to work using DOM where I had to typecast the document to (XmlDocument) while creating an xml file.
But now I have figured that com.sun.xml.tree.xmldocument has ben replaced by org.apache.crimson.tree.XmlDocument.
But would you please let me know (since you have asked why was i using com.sun* package), if there is any other way ?
Thank you for your reply.
Radha
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
If you're using DOM, I'd think you can use the standard org.w3c.dom.Document interface (and the rest of org.w3c.dom.*) instead of the actual implementation classes.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: error while trying to import
 
Similar Threads
importing error in JSP
Impossible to find jars
Keytool import problem
Import statement problems
java.net