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 :{                                                                                                                                                                                                                                                                                       

Similar Messages

  • 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.

  • 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
    ^__^

  • Java.io.NotSerializableException: com.sun.xml.tree.XmlDocument

    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
    Ramzi

    There may be such a class, but if you are using JAXP correctly you should not need to use it.

  • 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.Grosser

    The 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.

  • 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 Maheshwari

    This 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

  • 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 ***");

  • 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,
    Chris

    I 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,

  • Where we get real time XML publisher with neat explanation

    hi every one
    where we get real time XML publisher with neat explanation for oracle apps

    Why XML Publisher Reports Why NOT Traditional Oracle Reports?
    Oracle Applications, SQL, PL/SQL: Why XML Publisher Reports Why NOT Traditional Oracle Reports?
    Developing XML Publisher Report - using Data Source as PL/SQL Stored Procedure
    Oracle Applications, SQL, PL/SQL: Developing XML Publisher Report - using Data Source as PL/SQL Stored Procedure
    Developing XML Publisher Report - Using Data Template as Data Source
    Oracle Applications, SQL, PL/SQL: Developing XML Publisher Report - Using Data Template as Data Source
    Regards,
    Srini

  • Where to get com/sun/mirror/apt/AnnotationProcessorFactor?

    I am facing a problem with locating com/sun/mirror/apt/AnnotationProcessorFactory while trying to deploy my webservice in Tomcat. Could you please tell in which JAR file can I find this?
    I made an apt build task in this manner. My compile.classpath contains: jaxws-tools.jar.
        <taskdef name="apt" classname="com.sun.tools.ws.ant.Apt">
            <classpath refid="compile.classpath"/>
        </taskdef>
        <taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen">
            <classpath refid="jaxws.classpath"/>
        </taskdef>
        <target name="apt">
            <mkdir dir="${build.dir}"/>
            <mkdir dir="${build.dir}/WEB-INF"/>
            <mkdir dir="${build.dir}/WEB-INF/classes"/>
            <mkdir dir="${build.dir}/WEB-INF/lib"/>
            <copy todir="${build.dir}">
                <fileset dir="${web.dir}"/>
            </copy>
            <apt sourcepath="${src.dir}"
                 destdir="${build.dir}/WEB-INF/classes"
                 debug="${compile.debug}"
                 deprecation="${compile.deprecation}">
                <classpath refid="compile.classpath"/>
            </apt>
            <copy todir="${build.dir}/WEB-INF/classes">
                <fileset dir="${src.dir}" excludes="**/*.java"/>
            </copy>
            <copy todir="${build.dir}/WEB-INF/lib">
                <fileset dir="${lib.dir}">
                    <include name="*.jar"/>
                </fileset>
            </copy>
        </target>Then I tried building my project, but I got this error.
    humpty@nifty:~/lab/wsdl/jaxrpc$ ant
    Buildfile: build.xml
    Trying to override old definition of task apt
    apt:
          [apt] An exception has occurred in apt (1.6.0_10). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport)  after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report.  Thank you.
          [apt] java.lang.NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory
          [apt]     at java.lang.ClassLoader.defineClass1(Native Method)
          [apt]     at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
          [apt]     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
          [apt]      at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
          [apt]      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
          [apt]      ... 38 more
          [apt] Command invoked: apt -d /home/humpty/lab/wsdl/jaxrpc/build/WEB-INF/classes -sourcepath /home/humpty/lab/wsdl/jaxrpc/src/java -g -classpath /home/humpty/lab/wsdl/jaxrpc/lib/FastInfoset.jar:/home/humpty/lab/wsdl/jaxrpc/lib/activation.jar:/home/humpty/lab/wsdl/jaxrpc/lib/http.jar:/home/humpty/lab/wsdl/jaxrpc/lib/jaxb-api.jar:/home/humpty/lab/wsdl/jaxrpc/lib/jaxb-impl.jar:/home/humpty/lab/wsdl/jaxrpc/lib/jaxb-xjc.jar:/home/humpty/lab/wsdl/jaxrpc/lib/jaxws-api.jar:/home/humpty/lab/wsdl/jaxrpc/lib/jaxws-rt.jar:/home/humpty/lab/wsdl/jaxrpc/lib/jaxws-tools.jar:/home/humpty/lab/wsdl/jaxrpc/lib/jsr173_api.jar:/home/humpty/lab/wsdl/jaxrpc/lib/jsr181-api.jar:/home/humpty/lab/wsdl/jaxrpc/lib/jsr250-api.jar:/home/humpty/lab/wsdl/jaxrpc/lib/mimepull.jar:/home/humpty/lab/wsdl/jaxrpc/lib/resolver.jar:/home/humpty/lab/wsdl/jaxrpc/lib/saaj-api.jar:/home/humpty/lab/wsdl/jaxrpc/lib/saaj-impl.jar:/home/humpty/lab/wsdl/jaxrpc/lib/stax-ex.jar:/home/humpty/lab/wsdl/jaxrpc/lib/streambuffer.jar:/home/humpty/lab/wsdl/jaxrpc/lib/woodstox.jar
    BUILD FAILED

    i found it in axis2-1.4-bin\axis2-1.4\lib\jaxb-xjc-2.1.6.jar
    but in different package
    jaxb-xjc-2.1.6.jar\com\sun\xml\xsom\parser
    maybe look for this jar.

  • How to get the " com.sun.xml.* " package?

    In a java xml sample, it uses a class "com.sun.xml.tree.XmlDocument". Its author said it is a internal class.But I can't find the class in "com.sun" package. Please tell me how to get the class?
    Thanks very much!

    This set of classes was available in the J2ee.jar that was packaged with j2sdkee1.2.1, This set of classes is NOT in the j2ee.jar of the j2sdkee1.3.1. After we upgraded, we started to get these errors ... have no idea where/if these classes are still available as add on api or not. I downloaded the the java xml pack and this class is not available in any of the jars contained within.

  • How to download sun XML parser/Where to find the parser itself to downloa?.

    I saw the website below. But I do not have a clue of what to download and where to store any files in my directories and how to set the classpaths to run the file below.
    http://java.sun.com/developer/earlyAccess/xml/index.html
    to run this program
    import java.io.File;
    import com.sun.xml.parser.Resolver;
    import com.sun.xml.tree.XmlDocument;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    public class Simpleparser
    public static void main (String argv [])
         InputSource input;
    XmlDocument doc;
    }

    The date on that page is 2002-10-14. It is totally obsolete. If you saw examples using a parser whose name starts with "com.sun" then those examples are totally obsolete as well.
    If you're using Java 1.4 then it already includes an XML parser. Just look for Java XML tutorials that are more recent and read them. You don't need to download anything.

  • About com.sun.xml.*

    When did I run a program the tomcat tell me can't find the com/sun/xml/tree/XmlDocument .
    Can't you tell me where jar file is this class in?
    TKS!

    I'm wondering why you need it. Are you referencing it explicitly in your code. I'm not sure this jar is supplied by sun anymore but it probably is.

  • 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).

Maybe you are looking for

  • FTP/SFTP/FISH (etc) slow file transfer rate over LAN

    Hi everyone, I have a problem with transferring files over my home network that has been bothering me for quite some time. I have a 802.11n router which should provide me with the transfer rate up to 150 Mbps (afaik). When I download files from the I

  • New Payment terms

    Hello Gurus, I need to create a new payment term in OBB8, for example -7days/3%, 14days/1,5%, 30days/1% and 60days without discount-, but the standard only permit 3 conditions. There´s any workaround for this question? Any solution?? Thanks in advanc

  • Sap ecc 6.0 functional area not getting populated on controlling allocation

    Gurus, Your expertise is very much required. new gl not activated... public sector not used cost of sales activated functional area field is not visible on ksv1 or distribution cycle, same for assessment. Kindly help.

  • Does 2.1 Amp charger harm iphone 4S battery ?

    I'm willing to buy a third party 2.1 Amp charger as my original Apple 1 Amp charger is too slow, but i was wondering if the excess amperes will harm by battery or decrease its life. Thanks in Advance :)

  • Complicated Airport Question

    So here is my setup: 1) In the house, I have a PC hooked up to Optimum Online cable. I also have a Wireless G Linksys Router that I use when I use my PC Laptop in the house. 2) My mother gave me her "old" G5 which is beautiful. I put it in the garage