XML serializer problem

I am trying to use an XML serializer to get an XML file place in an exist database and store it to the hard drive as an XML file.
my code in order to do that is
XMLResource documentbef = (XMLResource)r;
doc2=(Document) documentbef.getContentAsDOM();
doc2.normalize();
OutputFormat format = new OutputFormat(doc2);
format.setIndenting(true);
XMLSerializer serializer = new XMLSerializer(new FileOutputStream(new File("C:\\Configuration\\XmlRoomCopy.xml")), format);
serializer.serialize(doc2); i have included the needed jar files, and did the imports. but i get the following errors
symbol  : constructor OutputFormat(org.w3c.dom.Document)
location: class org.apache.xerces.domx.XGrammarWriter.OutputFormatand
symbol  : method setIndenting(boolean)
location: class org.apache.xerces.domx.XGrammarWriter.OutputFormat
format.setIndenting(true);
symbol  : constructor XMLSerializer(java.io.FileOutputStream,org.apache.xerces.domx.XGrammarWriter.OutputFormat)
location: class org.apache.xml.serialize.XMLSerializer
XMLSerializer serializer = new XMLSerializer(new FileOutputStream(new File("C:\\Configuration\\XmlRoomCopy.xml")), format);i'm new at this so I could have done the dumbest mistake.
thank you

Hi.
Check this:
drop type msm force;
drop type list_msm force;
create type msm as object(
nume VARchar2(20)     --VARCHAR2 NOT CHAR
create type list_msm as table of msm;
create table produse
den char(20)
INSERT INTO produse VALUES('Prod.1');
INSERT INTO produse VALUES('Prod.2');
INSERT INTO produse VALUES('Prod.3');
COMMIT;
select xmlserialize (document xmlelement("values",
cast(multiset(
select trim(p.den) from produse p) as list_msm
) as clob indent size=2
) as "xml"
from dual;
<values>
  <LIST_MSM>
    <MSM>
      <NUME>Prod.1</NUME>
    </MSM>
    <MSM>
      <NUME>Prod.2</NUME>
    </MSM>
    <MSM>
      <NUME>Prod.3</NUME>
    </MSM>
  </LIST_MSM>
</values>Hope this helps.

Similar Messages

  • XML serialization problem

    Hi,
    I am using Simple 2.4.1 to serialize objects to XML.
    But I could not find out how can I serialize XML which has following DTD.
    <!ELEMENT test (test1 | test2 | test3)>
    Thanks in advance.

    No, DB is just our local crossposting detective. And boy is he efficient at it.
    If you crosspost, at least say so dude. That you want a quick reply is all fine and dandy, but generally people are not responsible enough to post back everywhere they posted as soon as they get an answer, which means people keep wasting time trying to help you. At least give people the chance to ignore you for what you've done.

  • XML Serialization Error- While testing BAPI turned Web service

    I have a requirement to create sales order in SAP R/3 from an e-commerce site. I went through many forums suggesting "exposing FMs into Web Service". I wrapped BAPI_SALESORDER_CREATEFROMDAT2 and BAPI_TRANSACTION_COMMIT into one FM and exposed as Web Service. I did a successful test-sequence.
    When I tested the web service without giving values I got a response asking for "Sold-to Party or Ship-To Party". While testing the Web service with some values, I got the below error -
    XML Serialization Error. Object content does not correspond to Schema restrictions of type [urn:sap-com:document:sap:rfc:functions][numeric4].
    The e-commerce team tried to hit the Web service and got the below error-
    IWAB0383E Error validating parameters
    Note: Our servers does not have any ENHPacks. Only ECC 6.0.
    Please suggest what might have gone wrong and how to resolve this.
    Thanks!

    Hi Gourav Khare,
    I have created WSDL file through function module in SAP-ECC 5.0v.
    I have followed below steps:
    Crated FM (SE37)
    Crated Web-service (SE37)
    Generated WSDL file using (WSADMIN)
    And consumed WSDF file in SOAP UI (SOAP UI 4.5.2 Trailer version)
    Problem is: while consuming WSDL file in  SOAP UI I getting  ‘Serialisation failed’
    For your reference I have furnished xml string below.
    SOAP UI Input:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sap-com:document:sap:rfc:functions">
    <soapenv:Header/>
    <soapenv:Body>
    <urn:YSDF_INV_PRINT_FINAL_RFC_WS_N>
    <!--Optional:-->
    <PWR_INVOICE>
    <INVOICE_SHIPPED_LINE>
    <!--Zero or more repetitions:-->
    <item>
    <POSITION1></POSITION1>
    <SALES_PART></SALES_PART>
                      <PART_DESC></PART_DESC>
    <PRICE></PRICE>
    <QUANTITY></QUANTITY>
    <CUSTOMER_TAX_NO></CUSTOMER_TAX_NO>
    <PROD_NONINVENTORY></PROD_NONINVENTORY>
    <PROD_TAXABLE></PROD_TAXABLE>
    <TAX_LEVEL></TAX_LEVEL>
    </item>
    </INVOICE_SHIPPED_LINE>
    <INVOICE_NO></INVOICE_NO>
    <ORDER_NO></ORDER_NO>
    <DATE_PRINTED></DATE_PRINTED>
    <DIV_CD></DIV_CD>
                <LAST_COST_INVOICE></LAST_COST_INVOICE>
    <DELETE_ZERO_COST></DELETE_ZERO_COST>
    <DELETE_NON_SHIPPED></DELETE_NON_SHIPPED>
    <GLOBALREF></GLOBALREF>
    <ORIGIN></ORIGIN>
    <ORIGINID></ORIGINID>
    </PWR_INVOICE>
    </urn:YSDF_INV_PRINT_FINAL_RFC_WS_N>
    </soapenv:Body>
    </soapenv:Envelope>
    SOAP UI Output:
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
    <soap-env:Body>
    <soap-env:Fault>
    <faultcode>soap-env:Client</faultcode>
    <faultstring xml:lang="en">Serialisation failed</faultstring>
    <detail>
    <n0:SimpleTransformationFault xmlns:n0="http://www.sap.com/transformation-templates">
    <MainName>/1BCDWB/WSS0130716111624448000</MainName>
    <ProgName>/1BCDWB/WSS0130716111624448000</ProgName>
    <Line>8</Line>
    <Valid>X</Valid>
    <ReferenceFault>
    <DescriptionText>Error accessing the ref. node 'INVOICE_ID'</DescriptionText>
    <RefName>INVOICE_ID</RefName>
    </ReferenceFault>
    <Caller>
                      <Class>CL_SRG_RFC_PROXY_CONTEXT</Class>
    <Method>IF_SXML_PART~DECODE</Method>
    <Positions>1</Positions>
    </Caller>
    </n0:SimpleTransformationFault>
    </detail>
    </soap-env:Fault>
    </soap-env:Body>
    </soap-env:Envelope>
    And one more things are
    I don't know the exact reason, but now the WSDL is working fine. No Idea, will it be consistent.
    No changes in import and export parameters of RFC and no change in code, even if the logic is changed it should not affect the output on SOAP UI but in my case it does.
    Wonder why all this happens, I cannot explain the exact reason technically because my RFC works fine every time, only issue is with SOAP UI.
    From SAP point of view FM is working fine, and input parameter of FM is optional, validations are done by the programming logic and it will capture the message and its details with respect to input data.
    I am not sure SOAP will work consistently and we are using ECC 5.0 most of the t-code not there like "SOAMANAGER" and all.  
    Kindly help me on this
    Thanks & Regards,
       Akshath.L.T

  • XML Serializer....!

    Hi guys...!
    I'm writting a program in Java that prints out the content of an XML file. I imported different classes, but some of the class that I imported do not work. I don't know why.
    Since some of the classes do not work, I can't compile my java program.
    Here are the classes that give me error....
    import org.apache.xml.serialize; .============> ERROR
    import org.apache.xml.serialize.OutputFormat; ===========> ERROR
    import org.apache.xml.serialize.Serializer; ===============>ERROR
    import org.apache.xml.serialize.DOMSerializer; ===========>ERROR
    import org.apache.xml.serialize.SerializerFactory; =========>ERROR
    import org.apache.xml.serialize.XMLSerializer; ===========>ERROR
    and here are the codes that don't compile within my java program..
    OutputFormat format = new OutputFormat (doc); ==========>ERROR
    StringWriter stringOut = new StringWriter ();
    XMLSerializer serial = new XMLSerializer (stringOut, format); ==>ERROR
    serial.serialize(doc);
    System.out.println(stringOut.toString());
    Can you guys please help me finding out what is going on in my codes????
    Any help will be appreciated...
    Thanks...
    --- Spirit_Away

    While this problem is simple to someone who's battled classpath problems many, many times, it's frustrating as hell to those who haven't.
    You have a run time classpath and a compile time classpath.
    A compile-time classpath is used by javac or your IDE to find the classes that you're referencing when your code is compiled.
    If you compile a simple class from the command-line with javac, you'd use the -classpath option to specify to the Java compiler where it needs to look to find the classes you've referenced in your class.
    If you use an IDE, you need to tell your IDE where to find the classes you're referencing in your class -- each IDE does this slightly differently. In Eclipse, it's referred to as your "build path" and it contains either folders of classes or JAR files. As you add JARs or folders of classes to your build path, you make those classes available at compile time to your classes that you're compiling.
    If you manage to include those properly, you'll end up with YourClass.class -- a compiled version of your class.
    Now, to invoke your class, you need to make sure that the same classes/JARs that you put in your build path are also available to the Java Virtual Machine when you execute your class -- this is done through the CLI with the -classpath option to the java command.
    There are a few ways to get those classes in your runtime classpath.
    You can:
    a) set an environment variable called CLASSPATH which includes the JARs/class folders so that every time the jvm is invoked (e.g. prompt$ java MyClass ) those classes are included in the runtime classpath
    b) throw all of your dependent JARs/classes into $JAVA_HOME/jre/lib/ext so that anytime anyone on that machine executes the JVM, those dependent classes are included in the system-wide classpath
    c) include the JARs/class folders in the classpath argument when invoking the JVM (e.g. prompt$ java -classpath=".:HelperClasses.jar" MyClass )
    Personally, I find a) and b) to be bad ideas. Especially if you build Java apps to distribute. It makes it far too easy to forget to include dependent JARs and classes, because while they work for you on your system, they won't work on another system, unless that system also has the dependent JARs/classes installed properly in the classpath -- either for that system or the executing user.
    Another drawback is that by silently including classes in your runtime classpath, you can unknowingly create class conflicts as you can end up accidentally loading multiple copies of the same class -- sometimes different versions -- and you don't realize that the one you THINK is executing is actually not the one that ACTUALLY is.
    For this reason, I strongly suggest keeping your system class path and CLASSPATH variables empty and using option C -- until you have a strong handle on how classpaths work.
    Some people will throw all of their dependent classes/jar files into $JAVA_HOME/jre/lib/ext to avoid having to add them to their runtime classpath.
    In your case, you'd need to include the JAR files as options to the -classpath argument when you invoke the JVM.

  • Getting xml serializer exception

    dont know what this mean, did anybody got this exception before.
    Searched on google but got few results only which were not helpful.
    Frustrated posting this here . if anybody has seen this and resolved this , give me tips on how to get this working or atleast what could be cause of this problem.
    java.lang.NullPointerException
    at org.apache.xml.serialize.OutputFormat.whichMethod(Unknown Source)
    at org.apache.xml.serialize.OutputFormat.<init>(Unknown Source)
    at com.tibco.portalservices.administrator.AbstractDOMDeploymentDescriptorEditor.update(AbstractDOMDeploymentDesc
    riptorEditor.java:125)
    at com.tibco.wfc.AbstractContainer.update(AbstractContainer.java:32)
    at com.tibco.wfc.AbstractContainer.update(AbstractContainer.java:32)
    at com.tibco.administrator.consoles.deploymentconfiguration.ServiceDetailPane.update(ServiceDetailPane.java:94)
    at com.tibco.wfc.AbstractContainer.update(AbstractContainer.java:32)
    at com.tibco.wfc.AbstractContainer.update(AbstractContainer.java:32)
    at com.tibco.wfc.AbstractFrame.update(AbstractFrame.java:101)
    at com.tibco.wfc.FramesetComponent.update(FramesetComponent.java:186)
    at com.tibco.wfc.AbstractContainer.update(AbstractContainer.java:32)
    at com.tibco.wfc.AbstractFrame.update(AbstractFrame.java:101)
    at com.tibco.wfc.FrameManager.a(FrameManager.java:235)
    at com.tibco.wfc.FrameManager.service(FrameManager.java:142)
    at com.tibco.administrator.AdministratorServlet.service(AdministratorServlet.java:843)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1040)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151)
    at java.lang.Thread.run(Thread.java:595)

    There is no HashMap in your ArrayList. Take a look at this line:
    selectedDataList.add(searchList);I think a object f type SearchBean is added to the list here. This is no HashMap I presume.
    Please use code tags when posting code. This looks lke this:
    public String getSelectedItems() {
    // Get selected items.
    HashMap map = new HashMap();
    DeleteContentDialog deleteContentDialog = new DeleteContentDialog();
    selectedDataList = new ArrayList();
    for (SearchBean searchList : searchResultdetails) {
    System.out.println("Inside getSelectedItems.........Inside for"+searchList);
    if (searchList.isSelected()) {
    System.out.println("Inside getSelectedItems........searchList."+searchList);
    selectedDataList.add(searchList);
    searchList.setSelected(false); // Reset.
    try {
    for(int i=0;i<selectedDataList.size();i++){
    System.out.println("Inside the delete Method");
    System.out.println("selectedDataList is "+selectedDataList.get(i));
    if (selectedDataList.size() != 0)
    System.out.println("Array List is having = "selectedDataList.size()" records");
    //printValuesTest(medianList);
    System.out.println("**************THESE ARE THE VALUES OF THE HASHMAP AT THE INDEX = "+i);
    map = (HashMap)selectedDataList.get(i);
    if (map.size() != 0)
    Iterator iterator = map.keySet().iterator();
    while (iterator.hasNext())
    String key = (String) iterator.next();
    String value = (String) map.get(key);
    System.out.println("Key = "key " and Value = "+value);
    deleteContentDialog.init(map);
    else
    System.out.println("Hashmap is empty");
    catch(Exception e){
    e.printStackTrace();
    return "deletedFile"; // Navigation case.
    }

  • Help on jar file for org.apache.xml.serialize.OutputFormat

    Hi all, I need help regarding on org.apache.xml.serialize.OutputFormat
    and org.apache.xml.serialize.XMLSerializer. May I know which jar files
    contain these? Thanks

    After installing jdk 1.5 the problem is now resolved and after prefexing a few of the import statements with com.sun.
    There are however some more classes as part of the Xerces 2.7.1 jar file as compared to the JWSDP 1.6 installed and this requires the xercesimpl.jar to be included in the classpath.
    Rgds,
    Seetesh

  • Sample ruby XML serialization code ?

    Does anybody have some sample ruby code to interface with the ACS4 server ? We are specifically interested by the XML serialization code and the generation of an hmac signature.
    Any help or pointer would be greatly appreciated.
    Thanlks!
    Eljay

    Sorry
    Diffrent versions of the JVM. A save game from J2SE
    1.4.2 might not work when the user upgrades to
    J2SE 1.5.Oh, OK. Thanks for clarifying things.
    >
    It also might fail if you change the internal
    structure of your saved classes.
    (as of yet I've heard of any problems, but this is the
    reason Sun give for using XML instead of
    Serialization)Sounds like a tradeoff . . . increased flexibility at the expense of increased complexity.
    >
    You might want to look into Externalization as well.Hmm, this makes things a bit more complex.
    What I did for my games was take String equivalents for all
    information I needed for a saved game and put them all together
    separated by spaces. Sounds like a good idea. A revised version of this idea might work.

  • 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

  • WIJ 20002 xml Parser Problem - Rich Client

    Hi,
    I have a problem with the rich client on a new installation:
    Business Objects Enterprise XI 3.1 SP3 on Windows 2008 Standard.
    If I connect with the rich client "import document"is disabled.
    if I try to create a new document from the rich client it returns the error below (I used the rich client on two workstations):
    WIJ 20002
    Version: null
    Analisi dello stack:
    java.lang.RuntimeException: java.lang.RuntimeException: XML parser problem:
    XMLJaxpParser.parse(): Element type "ABOUT_Patentnumbers" must be followed by either attribute specification, ">" or "/>".
    at com.businessobjects.wp.xml.jaxp.XMLJaxpParser.parse (Unknown Source)
    at.com.businessobjects.webi.richclient.XMLviaOccaRC.getServerConfiguration (Unknown Source)
    Have you any solution?

    The fixpack 3.5 client resolves the problem.

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

  • XML Unmarshal problem - Web Service Model

    Hi, I have generated a Webdynpro-Model out of a WebService (J2EE WAS 6.4 SP9 + IDE SP9). The WebService works within the WebServices Navigator, but being called from within WDDoInit() I get this exception. The generated proxy code "looks" ok and I am pretty lost here, any help appreciated:
    Service call exception; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.XmlUnmarshalException: XML Serialization Error. Object of Class [de.hpi.admui.models.lecture.proxies.types.p2.GetLecturesResponse] does not have property [Response] of type [[Lde.hpi.admui.models.lecture.proxies.types.MLecture;]. Check if the right object is passed to the serialization routine.

    Hi André,
    The reason could be that the WS Model has been generated out of a on older WSDL file. If this is the case, you have to regenerate it.
    If the WS is an SAP WS, you can trace the request and response that came to it and see if the response is correct to the WSDL. If yes, report a CSS message and attach the WSDL and the request/response to it.
    The WSDL that was used for the generation of the model is stored in src/packages/wsdls folder of your WD project.
    +In order to trace the request/reponse you have to set the severity to DEBUG as defined in the help portal: + http://help.sap.com/saphelp_nw04/helpdata/en/60/aec0b110a940d09e7a296c09af27bf/frameset.htm
    Best regards,
    Alexander

  • XML - ExportDocument problem

    I'm exporting a xml document that I'm creating dynamically in my application.
    I'm having the following problems (working with 30M.2).
    1)
    It's not possible to edit a DTD (or creating one run time) so I have to write a
    template doc XML to have it.
    I'm afraid that this is a costraint on the DOM1 so ...
    2)
    Once I complete the construction of the doc, I need to write it down (let's say
    on a file, but could be also in memory to send it on http).
    When I write it (using exportdocument function) I just find the root element
    with all it's children, no haeder (<?xml version="1.0" ?><!DOCUMENT ...>) so I
    cannot have the dtd information on the stream, and cannot enforce validation of
    the doc when someone read it afterwards.
    I admit I'm new of the subject, but or I miss something or something is wrong:
    having trouble to get a dtd and not being able to code it's information.
    Anyone has some ideas?
    TIA
    Luca

    I'm interested in DTDs. For example in the reported situation, why, if you
    know you've created a valid XML document would you want to give a DTD to
    someone at the other end? If someone has a DTD at the other end and want to
    use it to validate your XML then fine but if you create the XML and are
    controlling the format then wouldn't they just assume the XML correct if the
    DTD wasn't being controlled by a 3rd party or themselves?
    DTDs don't help you create a document but just validate it, I'd thought. If
    there is more to DTDs I'd appreciate if someone felt like ellaborating.
    Thanks.
    Matthew Middleton
    OrYx Software Consultant
    Lawpoint Pty. Limited
    A Solution 6 Company
    Ph: +61 2 9239 4972
    Fax: +61 2 9239 4900
    E-mail matthewmwriteme.com
    ----- Original Message -----
    From: Luca Gioppo <Luca.GioppoCSI.IT>
    To: <forte-userslists.xpedior.com>
    Sent: Tuesday, August 08, 2000 8:24 PM
    Subject: (forte-users) XML - ExportDocument problem
    >
    >
    I'm exporting a xml document that I'm creating dynamically in myapplication.
    I'm having the following problems (working with 30M.2).
    1)
    It's not possible to edit a DTD (or creating one run time) so I have towrite a
    template doc XML to have it.
    I'm afraid that this is a costraint on the DOM1 so ...
    2)
    Once I complete the construction of the doc, I need to write it down(let's say
    on a file, but could be also in memory to send it on http).
    When I write it (using exportdocument function) I just find the rootelement
    with all it's children, no haeder (<?xml version="1.0" ?><!DOCUMENT ...>)so I
    cannot have the dtd information on the stream, and cannot enforcevalidation of
    the doc when someone read it afterwards.
    I admit I'm new of the subject, but or I miss something or something iswrong:
    having trouble to get a dtd and not being able to code it's information.
    Anyone has some ideas?
    TIA
    Luca
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

  • Xml/serialize/XMLSerializer error in weblogic 7.0 SP6 app

    I am using weblogic 7.0sp6 and solaris 9
    We recently migrated app to another physical server but the same weblogic version.
    Once the application is deployed when we try to access that application it give us an exception.....
    java.lang.NoClassDefFoundError: org/apache/xml/serialize/XMLSerializer
    The same code/app is running successfull on the old server (solaris 9 and weblogic 7.0sp6)
    I compared the weblogic "lib" folder on both the servers and they looks identical...
    Any thoughts on why this is happening?

    We faced with the similar issue in WLS 7.X after below Assertion error after restoring services we were able to resolve this issue for time being as per the weblogic there is a patch provided by BEA and this sort of issue is resolved.
    This issue has been identified and updated under cars CR103525
    Regards,
    CSR
    BEA Analyst

  • Txt to xml. Problems with characters(&, , ',...)

    I want to generate a xml file with text from a txt file but i have problems with special characters such as &, <... I'd like to know if there�s any class or library to filter the text in order to generate my xml without problems.
    Thank you.

    Use JDOM to generate your XML. It will worry about escaping issues for you.
    Here's a (probably rather inelegant) example for you to play around with:
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.*;
    public class DateBoom {
         public static void main(String[] args)
              throws Exception
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              DocumentBuilder builder = factory.newDocumentBuilder();
              String dodgyText = "< & '";
              Document document = builder.newDocument();
              Element root = document.createElement("root");
              root.setAttribute("dodgy",dodgyText);
              document.appendChild(root);
              Element child = document.createElement("child");
              root.appendChild(child);
              child.appendChild(document.createTextNode(dodgyText));
              Transformer transform = TransformerFactory.newInstance().newTransformer();          
              Source source = new DOMSource(document);
              Result result = new StreamResult(System.out);
              transform.transform(source,result);
    }Your alternative is to use something like String regular expressions (regex) to do this manually, but the XML oriented libraries will catch more corner cases than you're likely to anticipate, making them more reliable.

  • Character reference in Apache xml serializer

    Hi,
    I am having some issues with XML serializer while having control characters in the String.
    The control characters are getting converted to character reference in apache XML serializer.
    Could anyone help me to disable the control characters getting converted to character reference?
    or Do we have anyway to suprees/remove these control characters?
    Could anyone please help us on this issue?
    Thanks a lot!!!
    Rajkumar R.

    Since this is an apache product I suggest you look at the apache documentation on the apache web site or have a look at the apache forums.
    You shouldn't need to worry about control characters being converted because the reader should convert them back again. If it doesn't it is probably a bug on the readers side.

Maybe you are looking for

  • BPM Alerts - Dynamic Text

    Hi, I'm triggering Alerts from BPM with Dynamic variables. In ALRTCATDEF I was not able to define the header ( Subject field on the email ) as I need to check Dynamic Text box which will deactivate Short and Long Text. Furthermore Shortext ( for exam

  • Importing another swf file into the flash-homepage (swf is a gallery)

    hi there! have a problem that i cant resolve myself .. i downloaded a free of use gallery from juliuswebdesign.com (this gallery) and i'm trying to load it in my flash site .. now, the gallery works if i open it directly (i open the swf file) BUT whe

  • Using Health app in iOS 8

    Perhaps I'm missing something about how the "Health" app is supposed to work. It seems to have the most odd data point categories, while leaving out many obvious ones. For example, you're able to track your "Molybdenum" intake, but you can't keep tra

  • Bug Report - stuttering sound when FWD to live TV

    I tend not to check this board these days as I'm pretty happy with the service, however, I've noticed recently that if I pause TV, then fast forward back to live TV, the sound has a little stutter every few seconds.  This isn't the HDMI issue, it app

  • Retrieving data on apps in time machine

    I erased some notes from Notes.app. I thought i could retrieve it from backups in time machine. I had a similar problem with iCal before. When I ask time machine to restore the data, it says it can't modify the app. So what good is backing up data to