Where can I find com.sun.xml.tree?
Recently I was using java to achieve the transformation process from XML document to HTML document. The XML processor is Xalan-J. Of course, I also used Java API for XML(JAXP). During the process, I would use XMLDocument object, which need the help of com.sun.xml.tree, but I cannot find this package.
Could you please tell me where I can find it?
SDK's version:1.4.1
Xalan-J's version:2.5
JAXP's version:1.2
To DevMentee: Thanks for your codes.
I also coded pieces of programme to achieve my goal avoiding that package:
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
public class SimpleTransform
public static void main(String[] args)
throws TransformerException, TransformerConfigurationException,
FileNotFoundException, IOException
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer(new StreamSource("transform.xsl"));
transformer.transform(new StreamSource("myfile.xml"), new StreamResult(new FileOutputStream("myfile.html")));
System.out.println("*** The result is myfile.html ***");
Similar Messages
-
Where do i find com.sun.xml
Hi,
i need to import com.sun.xml package but i get an error message: The import cannot be resolved. Evidently i miss some API. Where do i find it.
Thanks in advance.Hi,
i need to import com.sun.xml package but i get an
error message: The import cannot be resolved.
Evidently i miss some API. Where do i find it.
Thanks in advance.It's a good thing you can't find it anyways, because it is not a standard class. Nothing from com.sun.* should be directly used - only java.*, javax.* (and other names that come with the JRE), your own packages, and true 3rd-party packages. com.sun.* doesn't fit any of those categories, they're internal classes (I'm pretty sure anyway). -
Where is com.sun.xml.tree.XmlDocument ???
Where can I get this package (com.sun.xml.tree.*) ???
Where where where can iiiii get ?????????
Please, where?Hey guys,
I've got the same problem.
please help me to [email protected]
Thanks.
Basically, i am running a program which needs to import "com.sun.xml.tree.XmlDocument", but the system can't find it!!
I've downloaded J2SE 5.0 already, was thinking JAXP already included, but still not working. Can somebody tell me why please?
Big thanks again
^__^ -
Com.sun.xml.tree
Hi all,
I am new to JAVA's XML related capabilities. I am trying to compile a program which imports com.sun.xml.tree for some reason. But I am not able to find which jar file it actually needs for this package and where to get it from. Can somebody please help?
Thanks alot,
Ritesh MaheshwariThis is a common problem that is a result of improper use of the JAXP libraries.
The com.sun.xml.tree package is an implementation package that was part of the JAXP 1.1 (I culd be wrong about the number) but is not part of the new versions that come with 1.4.
The person whoe wrote the code should never have used that package directly. In fact if you look at the Java docs for that package is specifically states not to use the classes directly.
Most likely the code uses the conm.sun.xml.tree.XmlDocument class to write a DOM document to a file.
If that is the case I can provide replacement code that will work in 1.4 -
Looking for com.sun.xml.tree package
Hi,
I�m looking for a jar which contains the XmlDocument class to download.
I found the package, (it�s com.sun.xml.tree) but I cannot find where the package/jar is to download it.
Your help will be much appreciated.
Thank you,
ChrisI have all latest jars (jaxp, xerces, xalan, jdom, dom4j and any related jars). I have w3c DOM and i have been trying to convert it to JDOM and dom4j using relevant APIs. i keep getting following error.
Exception in thread "main" java.lang.AbstractMethodError: com.sun.xml.tree.Eleme
ntNode.getNamespaceURI()Ljava/lang/String;
at org.dom4j.io.DOMReader.readElement(DOMReader.java:181)
at org.dom4j.io.DOMReader.readTree(DOMReader.java:106)
at org.dom4j.io.DOMReader.read(DOMReader.java:88)
Can you advise what could be the reason and how to resolve this?
FYI : my w3c DOM has been created with com.sun.xml.tree.XmlDocumentBuilder class and other methods of the package. I need to resolve this error at earliest to move forward.
I would apprecaite early response at [email protected]
Thanks, -
Import com.sun.xml.tree.XmlDocument
Hello! Can some one help me on the following problem?
I am writing a DOM parser and I need to print out the modified xml file. So I want to use the write funcition defined in the com.sun.xml.tree.XmlDocument library. But this package is NOT included in JAXP package. Where shall I get this com.sun.xml.tree.XmlDocument library?
Any help is greatly appreciated.You are WRITING an XML parser? Hopefully you meant that you were USING an XML parser. If you are using JAXP (which does include an XML parser) then you don't need that package to output XML. The example you got that idea from is obsolete.
If your question is "How to use JAXP to write XML from a Document object?" then this is a FAQ here. Perhaps the search function is working and you could find the answer in this forum; I recall that it involves creating a Transformer whose input is the Document and whose output is wherever you wanted the XML to go to. -
Hi,
I got this error when my servlet is trying to parse a xml document:
RuntimeRemoteException( java.io.WriteAbortedException: Writing aborted by exception; java.io.NotSerializableException: com.sun.xml.tree.XmlDocument )
And my application runs ok when Tomcat is used as servlet container, but it runs into problem when iPlanet is used.
Any idea?
Thanks in advance!Thanks for your reply.
The EJBs in the application are all stateless beans. The error happens at the servlet side, not the EJB side. When the servlet tries to parse the returned XML document using xalan 1.0, the error happened. However, I can not reproduce the error when I use Tomcat as servlet container.
here is how I coded:
XSLTProcessor processor = XSLTProcessorFactory.getProcessor(new org.apache.xalan.xpath.xdom.XercesLiaison());
XSLTInputSource xmlSource = new XSLTInputSource(doc);
XSLTInputSource xslSheet = new XSLTInputSource("file:"+xslFile);
Writer out = new StringWriter();
XSLTResultTarget xmlResult= new XSLTResultTarget(out);
processor.process(xmlSource,xslSheet,xmlResult); -
Com.sun.xml.tree.XmlDocument;
Is there any class with that name, where can I find it?
N.B. I already installed jaxp and include it in the classpath
RamziThere may be such a class, but if you are using JAXP correctly you should not need to use it.
-
Hi,
when I invoke wsimport with Ant to create the client artifacts with the custom-client-binding file I always get an error like "javax.xml.stream.FactoryConfigurationError, can not find provider class com.bea.xml.stream.MXParserFactory".
I can not find the BEA provider in the JWSDP 2.0.
Who can help me?
wolfgangYou need an implementation of the JSR-173 API on your classpath, e.g. sjsxp.jar from the JWSDP.
-
Where can I find the config.xml file for my Edge project?
Or is that a nonsensical question?
Basically, I am producing a very simple iPad app using Edge and PhoneGap Build. It's all good to go apart from the orientation - I want to be able to lock it to portrait. On researching, it appears that I need to specify the web build/app as portrait in the config.xml file - so where would I find this?
Thanks!I am not familiar with the phonegap process but I suspect the file you should be attempting to modify is called manifest.xml.
Example, see someone else's solution posted here. jQuery Mobile lock orientation - Stack Overflow
hth
Darrell -
Where can I find com.aii.mappingtool.tf3.rt.Container
I want to develop a user-defined function in Eclipse and use BIT41 as a reference how to use the container parameter.
According to the BIT41 documentation (section User Defined Functions, page 8), I should :
import com.sap.aii.mappingtool.tf3.rt.Container;
in my code.
The problem is, that I can not find the jar file on my workstation to be used.
So I can not compile and test on my workstation, before loading it to my mapping on XI.
XI used is 3.0.
Any help please.sorry for wrong inputs.
Message was edited by: siva maranani -
Hi all,
some of you now where is the .JAR that contains the com.sap.aii.proxy.xiruntime.core.* api's? Generated java proxies from PI 7.0 are using many classes at this package, and I couldn't find it... some tip?
Thank you!
regards!
robertiRoberti,
You can get them from this location in XI Server:
aii_proxy_xirt.jar C:usrsapJ2EJC00j2eeclusterserver0 inextcom.sap.aii.proxy.xiruntime
aii_msg_runtime.jar C:usrsapJ2EJC00j2eeclusterserver0 inextcom.sap.aii.messaging.runtime
aii_utilxi_misc.jar C:usrsapJ2EJC00j2eeclusterserver0 inextcom.sap.xi.util.misc
guidgenerator.jar C:usrsapJ2EJC00j2eeclusterserver0 inextcom.sap.guid
Also check this document:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d06315a6-e66e-2910-039c-ba8bbbd23702
Regards,
---Satish -
Where can I find com.sap.portal.pcm.IObjectsManager class?
I am using EP6 SP9. Which jar file contains com.sap.portal.pcm.IObjectsManager class? I tried using classfinder but I couldn't locate it. I am not able to compile because one of the classes I am using depends on this class....
Hi Sam,
to be found under
...\irj\root\WEB-INF\portal\portalapps\com.sap.portal.ivs.api_portalpcm\lib\com.sap.portal.ivs.api_portalpcm_api.jar
Hope it helps
Detlev
PS: Please consider rewarding points for "problem solving answers", knick-knack...
PPS: Use ClassLocator instead (to be found on sourceforge). Better and faster. -
Where is com.sum.xml.tree.XmlDocument
Is there somebody who can tel me where to find
class com.sun.xml.tree.XmlDocument. I have some samples which i want to compile but i get a message that the XmlDocument class is not found. In my Jaxp classes is no class with that name.
So if there is somebody who knows that please answer
With greetings in previous M.GrosserThe new implementation of JAXP does not use com.sum.xml.tree.XmlDocument. I would also avoid using any of the implementation classes in any DOM package. My ex-coworker used this com.sum.xml.tree.XmlDocument and now we have to rewrite that code because our the new version or our application server automatically comes with the new version of JAXP and we get class cast exceptions. Even if you look at the API for any DOM implementation class you should see a warning saying that the classes could change without warning. Don't use them.
-
Where to get om.sun.xml.tree.XmlDocument library
Can some one help me on the following problem?
I am using a DOM paser and I need to print out the modified xml file. So I want to use the write funcition defined in the com.sun.xml.tree.XmlDocument library. But this package is NOT included in JAXP package. Where shall I get this om.sun.xml.tree.XmlDocument library?
Any help is greatly appreciated.Let me guess, you want to write a DOM document
to text. right?Wow, I'm a real mind reader considering you said as much in your post :{
Maybe you are looking for
-
I have an alert when a new version of software is available for download. The alert receives the text from an XML file for different languages. The problem I run into is when it shows the alert it displays the \n characters in the alert text. Does th
-
This is a followup on the post "JAVA Error Messages Thrown When Deploying Map Viewer," from Jun 12, 2008 11:22 AM. (reprinted below) Basically there are a number of java errors thrown when attempting to install Mapviewer. Has anyone else come across
-
401 Unauthorized Page Not working in SharePoint.
When a bad log-in is entered three times while opening a SharePoint Site, "401 Unauthorized"page is not reached but SP site returns a blank page. Its SP 2010 Environment with Windows Server 2008 R2 and IIS 7. Please share your thoughts in resolving t
-
DL DVD: REPORT_KEY failed : ASC = 0x6f, ASCQ = 0x04
Hi, trying to rip Monsters Inc (Pixair, Ha!), DL DVD in the latest 15" PB gives up with "REPORT_KEY failed : ASC = 0x6f, ASCQ = 0x04" error. Log files also states "SAM Multimedia: READ or WRITE failed, ASC = 0x6f, ASCQ = 0x04", but I am pretty sure i
-
QA11 and QA12 both not working
Hi Team, User is facing issue, for chaning the inspeciton lot. For QA11 it shows Usage decision is already made. And for QA12 it shows error message that Usage decision is not made. Also in QA02 it shows that can not change it as Usage decision is al