Org.jcp.xml.dsig.internal.dom.DOMKeyInfo equals() method implementation

I use something like this:
if(myKeyInfo.equals(anotherKeyInfo))
//I believe two signers are same. It seems correct.
Behind the scene the KeyInfo is implemented by org.jcp.xml.dsig.internal.dom.DOMKeyInfo.
I would like to have a look at org.jcp.xml.dsig.internal.dom.DOMKeyInfo to find out how its equals method is implemented.
Basically I would like to make sure wether myKeyInfo.equals(anotherKeyInfo) is the right way to ascertain the signer.

You can find the source in a few different places, either in the Apache XML Security project repository or the JDK 6 and OpenJDK projects on java.net. Here is a pointer to the JDK 6 source:
https://jdk-jrl-sources.dev.java.net/source/browse/jdk-jrl-sources/jdk6/trunk/j2se/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyInfo.java?rev=3&view=log

Similar Messages

  • What would be the result if we overrode the equals method properly

    import java.util.*;
    class Nearly{
       String value:
       Nearly(String v){ value = v;}
       public int hashCode(){ return 1;}
       public boolean equals(Nearly n){
       if(value.charAt(0) == n.value.charAt(0)) return true;
       return false;
       public static void mian(String [] sss){
         Nearly n1 = new Nearly("aaa");
         Nearly n2 = new Nearly("aaa");
         String s = "_";
         if(n1.equals(n2)) s += "1";
         if(n1==n2) s += "2";
         Set <Nearly> set = new HashSet <Nearly>();
          set.add(n1);
          set.add(n2);
         System.out.println(s + " " + set.size());
    }Ans: b) -1 2
    Reason: Two different equals() methods are invoked, because the equals() method shown in the code doesn't properly override Object.equals(), which takes an Object
    Ok so what would have been the result if the equals() method was something like this:
    public boolean equals(Object n)
    {I guess my question is about the overriding the equals() method which i am not able to understand

    pksingh79 wrote:
    what would be the result if we overrode the equals method properlyThe result would be a method, the functionality of which would adhere to Object#equals()'s contract:
    public boolean equals(Object obj)
    Indicates whether some other object is "equal to" this one.
    The equals method implements an equivalence relation on non-null object references:
    &#42; It is reflexive: for any non-null reference value x, x.equals(x) should return true.
    &#42; It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and
    only if y.equals(x) returns true.
    &#42; It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and
    y.equals(z) returns true, then x.equals(z) should return true.
    &#42; It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y)
    consistently return true or consistently return false, provided no information used in equals
    comparisons on the objects is modified.
    &#42; For any non-null reference value x, x.equals(null) should return false.

  • When we override Hashcode and Equal Methods

    Hi....I have doubt regading Hashcode and equal methods
    why we override this two methods....
    why we override hashcode method when we are overriding equal method,
    i would very thankful to give answser
    Thank you
    Ramesh

    hash code is computed to check the equality of two
    objects ,
    that is why if u change the default equal method
    implementation , u need to change the hashcode method
    as well.That's an incomplete answer at best.
    The hashcode method is used by hashing algorithms and data strcutures such as HashMap. This value is used to determine what 'bucket' the reference will go into. It cannot, by itself determine equality.
    If you are still unsure, I suggest looking up 'hash table' on google. I'm sure there's a decent explanation on wikipedia.

  • How to get nodes and its attributes of an XML file usiong DOM parsing?

    how to get nodes and its attributes of an XML file usiong DOM parsing?
    i am new to XML parsing.......
    Thanking you........

    import org.w3c.dom.Document;
    import org.w3c.dom.*;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;      ...
    //Setup the document
    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
         DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
         Document doc = docBuilder.parse (new File("MY_XML_FILE.xml"));
    //get elemets by name
         String elementValue = doc.getElementsByTagName("MY_ELEMENT").item(0).getTextContent();
    //This method can return multiple nodes, in this instance I get item(0) , first nodeRead the api for other methods of getting data.

  • Xslt conversion not working: nosuchmethoderror:org.apache.xml.dtm.ref.sax2d

    hi all, iam trying to convert xml file to html using xslt.
    for that iam using xalan implementation 2.6. this was working fine when i checked it from the application, no iam using servet which instantiates a object of the class and calls the method...and it not working now.
    it is giving this errror
    java.lang.NoSuchMethodError: org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.(Lorg/apache/xml/dtm/DTMManager;Ljavax/xml/transform/Source;ILorg/apache/xml/dtm/DTMWSFilter;Lorg/apache/xml/utils/XMLStringFactory;ZIZZ)V
         at org.apache.xml.dtm.ref.sax2dtm.SAX2DTM2.(SAX2DTM2.java:1901)
         at org.apache.xalan.xsltc.dom.SAXImpl.(SAXImpl.java:767)
         at org.apache.xalan.xsltc.dom.XSLTCDTMManager.getDTM(XSLTCDTMManager.java:390)
         at org.apache.xalan.xsltc.dom.XSLTCDTMManager.getDTM(XSLTCDTMManager.java:267)
         at org.apache.xalan.xsltc.trax.TransformerImpl.getDOM(TransformerImpl.java:477)
         at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:637)
         at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:317)
    ...can anyone tell me what the problem is? iam setting the system property at runtime like,
    java -Djavax.xml.transformer.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl GetTestiam using the standard way of instantiating the trnaformer like
    TransformerFacotry fac= transformerFactory.newinstance() etc.etc.
    is it beaucse iam not specifiying the imlementation in the application???if so how can i do that.
    thankyou.

    found the answer !!!
    i was using a buggy implementation of xalan. on loading the good xalan.jar and xercesImpl.jar files it started working.
    found that there was a memory leak in 2 places. not sure what that meant but some how the virtual machine wasnt getting the right values for the transformer.
    cheers.

  • Store and load objects to XML files using DOM

    Hello everybody,
    a quick question for all of you.
    I'm designing a desktop application which requires a lot of custom objects to be stored into XML files and later reloaded from them. I'm planning to use DOM, creating an interface like this:
    public interface StorableAsDom
    // Create an object from a DOM tree
    static Object createFromDom(org.w3c.dom.Node root) throws InvalidDomException;
    // Get the DOM tree for an object
    org.w3c.dom.DocumentFragment getDomTree(org.w3c.dom.Document doc) throws DOMException;
    Then, every class which needs to be saved should implement the above interface. This way everything works fine.
    My question is: do you know any available java package which already provides similar functionalities?
    I'd like not to reinvent the wheel if I can; time is always a critical factor.
    Thanks in advance to all of you.
    Cheers
    marcocaco

    Hi,
    When I need object -xml binding, I usually have two methods -
    one for reading & one for writing (the "VOs" below stands for "Value Objects" [getters/setters & empty constructor only]):
    READ: loadXML (= XML2VOs)
    1.XML2DOM - this method can be generic
    2.DOM2VOs - populate your VOs from the DOM just obtained in 1.
    WRITE: saveXML (=VOs2XML)
    1.VOs2DOM - create a new DOM document from your VOs' fields.
    2.DOM2XML - this method can be generic
    It would be nice (but dificult & not very elegant) to make DOM2VOs & VOs2DOM generic. If such methods will be written, they should be combined with the XML2DOM & DOM2XML (resp.) & then you would have two generic methods XML2VOs & VOs2XML... (Alternativelly, you can get Sun's JAXB package which does object-xml binding but this is not part of the JDK 5)
    If what I have outlined above sounds like what you want to do, let me know if you want more details (eg. how the DOM2VOs would be implemented etc)...

  • Deploying war in Weblogic 10 ; NoClassDefFoundError: org/apache/xml/utils/D

    How do I set a jar in setDomainEnv.cmd ? C:\mydirectory\repository\xalan\jars\xalan-2.7.0.jar
    If I set this one, will it resolve?
    <27-Nov-2012 6:08:26 o'clock PM PST> <Notice> <Log Management> <BEA-170019> <The server log file C:\bea10\user_projects\domains\mediation_te
    st\servers\MediationServer\logs\MediationServer.log is opened. All server side log events will be written to this file.>
    <27-Nov-2012 6:08:29 o'clock PM PST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
    <27-Nov-2012 6:08:31 o'clock PM PST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
    <27-Nov-2012 6:08:31 o'clock PM PST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <27-Nov-2012 6:08:34 o'clock PM PST> <Error> <HTTP> <BEA-101216> <Servlet: "action" failed to preload on startup in Web application: "tel-reference_ods-usage-web.war".
    java.lang.ExceptionInInitializerError
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    Truncated. see log file for complete stacktrace
    Caused By: org.apache.commons.logging.LogConfigurationException: java.lang.NoClassDefFoundError: org/apache/xml/utils/DefaultErrorHandler (Caused by java.lang.NoClassDefFoundError: org/apache/xml/utils/DefaultErrorHandler)
    at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
    at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
    at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
    at org.apache.struts.action.ActionServlet.<clinit>(ActionServlet.java:228)
    Truncated. see log file for complete stacktrace
    Caused By: java.lang.NoClassDefFoundError: org/apache/xml/utils/DefaultErrorHandler
    at com.tel.framework.config.PropertyNodeTypedXmlParser.parse(PropertyNodeTypedXmlParser.java:106)
    at com.tel.framework.config.PropertyNodeTypedXmlParser.parse(PropertyNodeTypedXmlParser.java:71)
    at com.tel.framework.config.file.FileXmlProvider.loadConfigurationComponent(FileXmlProvider.java:105)
    at com.tes.framework.config.ConfigProvider.loadConfiguration(ConfigProvider.java:120)
    at com.te.framework.config.ConfigContext.init(ConfigContext.java:176)
    Truncated. see log file for complete stacktrace
    Caused By: java.lang.ClassNotFoundException: org.apache.xml.utils.DefaultErrorHandler
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:280)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:253)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:56)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    Truncated. see log file for complete stacktrace
    >
    <27-Nov-2012 6:08:34 o'clock PM PST> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application 'tel-reference_ods-usage-web'.
    weblogic.application.ModuleException: [HTTP:101216]Servlet: "action" failed to preload on startup in Web application: "tel-reference_ods-usage-web.war".
    java.lang.ExceptionInInitializerError
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at weblogic.servlet.internal.WebComponentContributor.getNewInstance(WebComponentContributor.java:225)
    at weblogic.servlet.internal.WebComponentContributor.createServletInstance(WebComponentContributor.java:249)
    at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:255)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
    at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
    at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1976)
    at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1950)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1869)
    at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3126)
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1512)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:486)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
    at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
    at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:43)

    how do I SET classpath in setDomainEnv.cmd ? there are many types of classpaths.
    1.PRE_CLASSPATH
    POST_CLASSPATH
    EXT_PRE_CLASSPATH
    EXT_POST_CLASSPATH
    WLP_POST_CLASSPATH
    POST_CLASSPATH
    WEBLOGIC_CLASSPATH
    I used PRE_CLASSPATH for my case, first path worked, but second does not seem to work.
    set PRE_CLASSPATH=C:\myprojects\t91_rds_10_u_dev\vobs\rds_src\rds\ts-refe_ds-us-web\conf\conf-env\dv\;C:\mydirectory\repository\xalan\jars\ xalan-2.7.0.jar;
    How do I add class path to the first one? if i separate by ; will it work?
    If I want to add appCtx.properties C:\myprojects\t91_rds_10_u_dev\vobs\rds_src\rds\ts-refe_ds-us-web\conf\conf-app\appCtx.properties .
    Thanks

  • Simple XML parsing with DOM

    I have a XML file i need to parse. Can please someone give me a hint how to do this(please include code). Please note that im a new in XML and my DOM structure knowledge in limited(im confused from all the tutorials).
    XML code:
    <Vitals>
    <Hostname>sometest</Hostname>
    <IPAddr>sometest</IPAddr>
    <Kernel>sometest</Kernel>
    <Uptime>sometest</Uptime>
    <Users>sometest</Users>
    <LoadAvg>sometest</LoadAvg>
    </Vitals>
    <Network>
    <NetDevice>
    <Name>lo</Name>
    <RxBytes>10425010</RxBytes>
    <TxBytes>10425010</TxBytes>
    <Errors>0</Errors>
    <Drops>0</Drops>
    </NetDevice>
    <NetDevice>
    <Name>eth0</Name>
    <RxBytes>627976843</RxBytes>
    <TxBytes>2394415516</TxBytes>
    <Errors>271</Errors>
    <Drops>0</Drops>
    </NetDevice>
    </Network>
    So far ima at this step:
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    try {
    DocumentBuilder builder = factory.newDocumentBuilder();
    document = builder.parse( new File("NewFile.xml") );

    Just as simple text in console.
    Please give me the code.
    Is there any diference in document (DOM) if you create it with DFD or w/h ?
    So far i have this code, but it dosnt work for me(i get nothing as output:
    document = builder.parse( new File("NewFIle.xml") );
    NodeList list = document.getElementsByTagName("coffee");
    // Loop through the list.
    for (int k=0; k < list.getLength(); k++) {
    Node thisCoffeeNode = list.item(k);
    Node thisNameNode = thisCoffeeNode.getFirstChild();
    if (thisNameNode == null) continue;
    if (thisNameNode.getFirstChild() == null) continue;
    if (! (thisNameNode.getFirstChild() instanceof org.w3c.dom.Text)) continue;
    String data = thisNameNode.getFirstChild().getNodeValue();
    System.out.println(data);
    }

  • Problem writing xml file using DOM

    Hi,
    I am trying to write a xml file using DOM. I am using xalan 2.5, xerces 1.4.4, jdk 1.3.1 in JRun 3 on windows.
    The code where I get exception :
                   TransformerFactory tFactory = TransformerFactory.newInstance();
                   Transformer transformer = tFactory.newTransformer();
                   transformer.transform(new DOMSource(doc), new StreamResult("pr.xml"));
    I get the runtime error as follows:
    javax.servlet.ServletException: null
    java.lang.NoSuchMethodError
         at org.apache.xml.utils.DOM2Helper.getNamespaceOfNodeDOM2Helper.java:342)
         at org.apache.xml.utils.TreeWalker.startNode(TreeWalker.java:387)
         at org.apache.xml.utils.TreeWalker.traverse(TreeWalker.java:202)
         at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:343)
    Thinking it is because of classpath, I placed xalan 2.5, xerces 1.4.4 jar files in jrun admin lib directory and in server lib directory as well. Still getting the same error.
    Any suggestion?
    Thanks in advance

    xalan is included in JRun 4. However JRun 3 does not.
    However I tried with the same code in JRun3 in different system. The error is completely different. I understand this is because of different version of files. trying to solve ;)
    Here my new exception
    javax.servlet.ServletException: org/w3c/dom/ranges/DocumentRange
    java.lang.NoClassDefFoundError: org/w3c/dom/ranges/DocumentRange
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:493)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:493)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
         at org.apache.xerces.jaxp.DocumentBuilderImpl.(Unknown Source)
         at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source)
         at com.cybell.appl.deliveryorder.cmd.CreateXMLDOFile.createFile(CreateXMLDOFile.java:73)
         at com.cybell.appl.deliveryorder.cmd.CreateXMLDOFile.execute(CreateXMLDOFile.java:36)
         at com.cybell.appl.framework.cmd.BaseCommand.start(BaseCommand.java:50)
         at com.cybell.appl.framework.control.BaseController.service(BaseController.java:38)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
         at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1013)
         at allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:925)
         at allaire.jrun.servlet.JRunNamedDispatcher.forward(../servlet/JRunNamedDispatcher.java:34)
         at allaire.jrun.servlet.Invoker.service(../servlet/Invoker.java:84)
         at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1013)
         at allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:925)
         at allaire.jrun.servlet.JRunRequestDispatcher.forward(../servlet/JRunRequestDispatcher.java:88)
         at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1131)
         at allaire.jrun.servlet.JvmContext.dispatch(../servlet/JvmContext.java:330)
         at allaire.jrun.http.WebEndpoint.run(../http/WebEndpoint.java:107)
         at allaire.jrun.ThreadPool.run(../ThreadPool.java:272)
         at allaire.jrun.WorkerThread.run(../WorkerThread.java:75)

  • Import org.apache.xml.serialize.*;

    .java:66: package org.apache.xml.serialize does not exist
    import org.apache.xml.serialize.*;
    ^
    i am getting this error while running a java program, which i downloaded from a open source.
    i am using J Creator.
    i suppose i need to add a class path or package.
    can anybody tell me how to do this.
    and where can i find that package.
    if i can't find that in my system, where can i get it on net.

    .java:66: package org.apache.xml.serialize does notThe org.apache.xml.serialize.* package is part of Xerces:
    http://xml.apache.org/xerces-j/
    http://xml.apache.org/xerces2-j/index.html

  • Where to download java jar file with org.apache.xml.serialize.OutputFormat?

    Dear Friends,
    I try one program, it import org.apache.xml.serialize.OutputFormat;
    but I cannot fine it after I google a while.
    where can I find and download jar file that contain this:
    org.apache.xml.serialize.OutputFormat
    I use JDK1.6
    Thanks
    sunny

    So, to clear things up, there is no org.apache.xml.serialize.OutputFormat.JAR
    OutputFormat is a class.
    As I said in my previous post if you go at the xerces project home page (here) you will find a compiled version of xerces [here - direct link -> (fool proof)|http://archive.apache.org/dist/xml/xerces-j/Xerces-J-bin.1.4.4.zip]. If you extract the archive you will find a compiled jar called xerces.jar. Open that one with winrar/winzip or whatever, browse to org\apache\xml\serialize\OutputFormat.class and there you go, you have it, just link this xerces library to your project...
    PS. Try searching on Google for "Google tutorial"

  • Special charecters handling while Converting XML string to DOM

    Hi,
    I am using the following approach for converting XML string to DOM, but due to Special characters like "&", I am getting Exceptions:
    String xmlString;
    DocumentBuilderFactory factory =
    DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document document = builder.parse(new InputSource(new StringReader(xmlString)));
    Can anyone please help me out on how to handle the Special characters in the above code.

    If the XML doesn't parse, then the XML must be invalid. Show a sample of such a special character in the XML data. Please use \ tags to post the actual XML content and any other code.                                                                                                                                                                                                                                                                                                                                                                                           

  • Xml to Internal table : Issue

    Dear All,
    I have written a program to bring the data from xml to internal table  Below is the strucutre of my xml file .
    - <Data>
    - <MT Type="CR">
      <MatType>FERT</MatType>
      </MT>
    - <OP Type="CR">
      <MatNumber>9901040103-000115</MatNumber>
    - <Activities Element="AT">
    - <AT Type="CR">
      <MaterialNumber>115</MaterialNumber>
      <ActivityType>DEPR.</ActivityType>
      </AT>
    - <AT Type="CR">
      <MaterialNumber>117</MaterialNumber>
      <ActivityType>L.C.R</ActivityType>
      </AT>
      </Activities>
      </OP>
      </Data>
    .However I am not able to handle the multiple entries which comes together . ie
    - <AT Type="CR">
      <MaterialNumber>115</MaterialNumber>
      <ActivityType>DEPR.</ActivityType>
      </AT>
    - <AT Type="CR">
      <MaterialNumber>117</MaterialNumber>
      <ActivityType>L.C.R</ActivityType>
      </AT>
    Please let me know how to handle this . Thanks!
    Regards,
    Syed

    Hi ,
    To convert XML data into internal table u have to use FM "SMUM_XML_PARSE", this FM takes XString as input ,so first u have to
    convert  ur xml string into XString using FM "SCMS_STRING_TO_XSTRING".
    Thanks
    jitendra

  • Reading data from XML to Internal table

    Hi Experts,
    I got a requirement to read the data fom xml to internal table.is it possible to store deep internel table data into flat internal tables?my internel table contains 4 internel table and these 4 internel table contains 2 internel tables each...can any one help me o this...
    points will be rewarded...
    Regards,
    Rakhi

    Hi Rakhi,
    * Structure to Get the Client Details as in XML format
      DATA: BEGIN OF client,
              BEGIN OF Personal_Details,
                kunnr like kna1-kunnr,
                name1 like kna1-name1,
                adrnr like kna1-adrnr,
              END OF Personal_Details,
              BEGIN OF Address,
                street like adrc-street,
                city1  like adrc-city1,
              END OF Address,
              BEGIN OF Communication,
                fax_number like adrc-fax_number,
                tel_number like adrc-tel_number,
              END OF Communication,
            END OF client.
      DATA: it_client TYPE TABLE OF client WITH HEADER LINES,
            result LIKE client.
      DATA: xml_string TYPE string.
    *  Get the Client Details into the structure to be made as an XML string
      TRY.
    *  Convert the Structure to XML string
          CALL TRANSFORMATION  ('ID')
            SOURCE para = it_client
            RESULT XML xml_string.
    *  Convert the XML string to structure - result
          CALL TRANSFORMATION  ('ID')
            SOURCE XML xml_string
            RESULT para = result.
      CATCH cx_st_error.
      ENDTRY.
    best regards,
    Thangesh

  • Simple transformation error in converting XML to internal table

    Hi Team,
    I have an issue, its working in Dev, QA, and Prod in PI 7.0, once we upgrade it to PI 7.1 I'm getting the  below mention error,   
    Unknown Simple transformation error in converting XML to internal table
    Application error in mapping program ZF_INT006_FILE_TO_SAP_FILE, error code: , error text: Unknown Simple transformation error in converting XML to internal table An exception has occurred.
    Can any one suggest related notes are suggestion.
    appericate in advance for the solutions which you all provide me
    Thank you
    Venkat Anil

    Check the flag "use SAP XML toolkit" for the operation mapping and try, if that works then.
    Check the flag for all XSLT and Java mappings which is migrated from PI 7.0

Maybe you are looking for

  • Installed Mavericks - Now Dreamweaver CC has slowed to a Crawl

    Dreamweaver's poor performance under Mavericks is causing me enormous problems. I have wasted many hours trying to find a solution, and even more waiting for Dreamweaver to respond to the simplest of changes/additions to HTML/CSS. It seems that Apple

  • Media converter

    We need a media converter which should convert 1000 Mbps (TP-RJ45) to 1000 Mbps SX (Multi-mode Fiber) The length of the Fiber cable is 1 (One) Kilometer. Fiber Cable Type: 6 Core, 62.5/125µm Connector Type: MM SC connectors is there any type of media

  • Spotlight doesn't search in word documents

    Hello, I have a Question regarding Spotlight: If I look for any phrase which is in word documents, Spotlight doesn't find it. (I got some documents from a friend, each about 100 pages). When I use OpenOffice and export the documents to pdf: no proble

  • What level suplemental logging requires to setup Streams at Schema level

    Hi, Working on setting-up streams from 10g to 11g db @ schema level. And the session is hanging with statement "ALTER DATABASE ADD SUPPLEMENTAL LOG DATA" while running following command - generated using DBMS_STREAMS_ADM.MAINTAIN_SCHEMAS. Begin dbms_

  • Why those gray bars in the waveform monitor ?

    Hi, On previous FCP, the gray bars in the Waveform monitor were visible only when using the Sequence's RGB render settings. Now, with FCP 5.1.4, if i place, say, a layer with composite mode, the gray bars show even if i work in a "High quality YUV" s