Pointing to internal DTDs

Hello Experts,
I have a web application with two projects (web appl. project and enterprise appl. project). NDS automatically generates deployment descriptors web.xml and application.xml.
These files have the following code
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
                         "http://java.sun.com/dtd/web-app_2_3.dtd">...........
------------------------AND-----------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
                             "http://java.sun.com/dtd/application_1_3.dtd">....
I am trying to change both the files to point to dtds hosted on our company's internal server. They are the exact same DTDs that are at the sites(java.sun.com) found in the default deployment descriptor.
I get a deployment time error as mentioned below
java.lang.RuntimeException: ERROR: Cannot initialize EARReader: com.sap.engine.services.deploy.exceptions.BaseEarException: EAR C:usrsapJ2EJC00SDMrootoriginsap.comTestDBlocalhost2006.02.13.15.53.45temp36342TestDB.ear is not J2EE 1.2 compliant and cannot be converted to J2EE 1.3.Exception is: com.sap.engine.services.deploy.exceptions.BaseEarException: EAR C:usrsapJ2EJC00SDMrootoriginsap.comSamplelocalhost2006.02.13.15.53.45temp36342Sample.ear is not J2EE 1.2 compliant and cannot be converted to J2EE 1.3.
     at com.sap.engine.services.deploy.converter.EARConverter.convert(EARConverter.java:102)
     at com.sap.engine.deploy.manager.DeployManagerImpl.setEar(DeployManagerImpl.java:444)
As you see, it says its not of compatible version. I made sure that the DTDs are same. I even tried placing the DTDs internal to the deployment descriptors to confirm they are correct and they infact did deploy fine then.
Is there a reason why its saying so?
Thanks in advance,
Kiran

I still feel that the parser while parsing the application.xml does validate against the DTD hosted on java.sun.com as our application did fail to deploy once before when we couldn't reach the java.sun.com for some technical reasons.
There have been discussions about this here<u>http://www.xml.com/pub/a/2000/11/29/deviant.html</u> which has other links in it talking extensively about the problems with PUBLIC and SYSTEM identifiers referencing to DTDs on external websites.
Theoritically, XML 1.0 specifies that the parser should first derefence the PUBLIC identifier and in case it cannot find any associated URI, it should then use the SYSTEM identifier to access the DTDs. Unfortunately, the spec makes this optional, making this all more complex as each vendor implements its parser in this own way.
The solution as described is to use an Entity Management System with a resolver and catalog files to save DTDs on the application server and use them instead of depending on the network to validate your xmls against DTDs. Some servers like WebLogic provide such kind of features where in the server also provides caching of these DTDs.
I was wondering if such kind of support is offered by SAP WAS 6.40. I tried finding documentation related but to couldn't find any.
If anyone can through some light into this issue, that would be greatly appreciated.
Thanks,
Kiran

Similar Messages

  • How to add a internal dtd to my xml file

    I am using the xml parser for PL/SQL, how can add a internal dtd to my xml file..
    Thanks in advance...

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jinyu Wang ([email protected]):
    Sorry, there is not an API to set internal DTD.
    But you can set external DTD by using:
    PROCEDURE setDoctype(doc DOMDocument, root VARCHAR2,sysid VARCHAR2, pubid VARCHAR2)<HR></BLOCKQUOTE>
    Thanks for your replay...
    null

  • Generating Internal DTD Specifications

    I'm using the DocumentBuilderFactory method to create a DOM document, and using the TransformerFactory method to serialize my DOM document into an XML file.
    I'd like to programmatically produce an internal DTD as part of my serialized XML file, but I can't seem to find any examples or tutorials of how to do that online...
    I'm wanting to avoid 3rd party plugins. I'd just like to general the entire XML document with the internal DTD specification from within my Java code, if that's possible, rather than hard-coding the DTD as a String or in a separate file...
    Can anyone offer any assistance in how to generate an internal DTD with the methodology that I'm using to create the XML documents?
    I'm not 100% sure if the two above methods are general knowledge in the Java XML field, so I'm providing some sample code to specify what I meant by those terms.
    The DocumentBuilderFactory method to create a DOM document:
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document doc = builder.newDocument();
    // Create & add elements to the document as necessary
    ...TransformerFactory method to serialize my DOM document into an XML file:
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Transformer transformer = tFactory.newTransformer();
    DOMSource source = new DOMSource(doc);
    StreamResult result = new StreamResult(new File("test.xml"));
    transformer.transform(source, result);

    Are you looking for something like this?
    import java.io.*;
    import java.text.MessageFormat;
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    import org.w3c.dom.*;
    public class TestOutput {
        public static void main(String[] args) throws Exception {
         new TestOutput().test();
        public void test() throws Exception {
         Document doc = createDocument();
         String charset = "UTF-8";
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         write(doc, bos, charset);
         byte[] data = bos.toByteArray();
         System.out.println(new String(data, charset));
        public void write(Document doc, OutputStream os, String charset)
             throws Exception {
         PrintWriter writer = new PrintWriter(
              new OutputStreamWriter(os, "UTF-8"));
         writer.println(createXMLDeclaration(doc, charset));
         writer.println(createDTD(doc));
         writer.flush();
         transform(doc, os);
        private Document createDocument() throws Exception {
         DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
         DocumentBuilder builder = dbf.newDocumentBuilder();
         Document doc = builder.newDocument();
         Element elm = doc.createElement("GREETING");
         doc.appendChild(elm);
         Text text = doc.createTextNode("\n\tHELLO XML!\n");
         elm.appendChild(text);
         return doc;
        private String createDTD(Document doc) {
         return "<!DOCTYPE GREETING [\n" + "\t<!ELEMENT GREETING (#PCDATA)>\n"
              + "]>";
        private String createXMLDeclaration(Document doc, String charset) {
         return MessageFormat.format(
              "<?xml version=\"1.0\" encoding=\"{0}\" standalone=\"yes\" ?>",
              charset);
        private void transform(Document doc, OutputStream os) throws Exception {
         TransformerFactory tf = TransformerFactory.newInstance();
         Transformer t = tf.newTransformer();
         t.setOutputProperty(OutputKeys.INDENT, "yes");
         t.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
         t.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
         t.transform(new DOMSource(doc), new StreamResult(os));
    }Got the sample data from the XML Bible :-)
    Piet

  • Creating an internal DTD

    Hi there,
    I would like to create an internal DTD for my XML files within my PL/SQL procedure.
    I used the XMLDOM to create the xml document with the elements and attributes which
    is then saved to file.
    The filename is derived from an input parameter which is appended with the '.xml' extension.
    But now how do I create the DTD programmatically(using PL/SQL)? Can I use the XMLDOM to create it
    or is there some other way to create and insert the DTD into every file?
    Any help will be most welcome, even more so if it's a simple example.
    Thanking you,
    Francois Olivier

    Hi,
    I Think we cannt change it bcz its in grey mode. Once we set controlling area that order is created in that controlling area and we can have same controlling area for different co.codes.
    Suppose if we set different controlling area and try to create any order with out reference it gets change to different co.code.
    The reason may be that while creating Controlling area if u have set controlling area same as Co.code then we cannt change.
    Regards
    Balaji

  • Externally Hosted DNS - How do I set up my 2003 DNS server for sub domain to point to internal IP address??

    I have a domain name(domain.com) DNS hosted at my ISP. I also have 3 sub domains DNS hosted at the same ISP pointing to various external ip addresses (mail.domain.com, vpn.domain.com and ts.domain.com). We want to set up sales.domain.com to point to an
    internal 10. IP address. We have AD integrated DNS servers for our 2003 AD domain. The AD domain name is totally different than the hosted domain name in question. I currently edit the host file for a couple of PC's but this isnt practical company wide so
    I want to add entries on our internal AD DNS servers to resolve the locally hosted site. If i recall, someone once told me that you cannot just put an A record for one sub domain, I would have to have entries on my 2003 DNS server to resolve anything related
    to the domain.com name. Is this accurate? If so, what is the proper way to configure my 2003 AD DNS server to resolve anything domain.com related for my internal users while still allowing my ISP to do the DNS lookup for the internet.

    On my 2003 AD integrated DNS server...i rightclick forward lookup zone and choose...new zone..primary zone (store zone in AD checkbox checked)..i chose to all DNS servers in the AD domain for replication...zone name sales.domain.com....allow secure updates
    option....then i added an A record in that zone...sales.domain.com..pointed that towards my internal 10. IP address...is this correct? It seems to be working correctly for the sales.domain.com DNS record...and i tested the other sub domains...and those look
    like they are going to my ISP for DNS resolution...
    Is this the correct procedure? I did this on a test AD domain and not my production...i want to make sure i dont break everything under the domain.com by incorrectly adding 1 sub domain..

  • Entry Point for internal KM links

    Hi,
    Using a KM Navigation iView (LinkListExplorer Layout Set) I want to add a link to an internal KM document using "Organize Entries" -> Context Menu -> New -> Link.  When I press browse I can start browsing from where the link will be inserted, but I want to start browsing for the target "higher" in the KM structure.  A shot in the dark was to set the Root Folder for Navigation parameter to where I wanted to start browsing (but this did not help).
    Someone got a solution for this, or can point me in the right direction?
    best,
    Bjorn

    Hi,
      In the KM Navigation iview you have two parameters:
    Path to Initially Displayed Folder: from where you want to navigate.
    Path to Root Folder for Navigation: you can leave in blank this field.
    When you press Organize Entries, you can only navigate from where you have defined in the iview.
    An approach is you can use entry point repositories, when you press browse link button, you are going to see these repositories. These entries are going to appear as Favorites, Personal Documents, Public Document so on.. in More link you see all your entry points.
    Patricio.

  • Sun Studio Express - February 2008 download link points to internal site

    The download link at http://developers.sun.com/sunstudio/downloads/ssx/readme.html, part 4 points to a Sun internal
    site (http://dscpreview.sfbay/sunstudio/downloads/express.jsp).
    Can this be fixed ?

    Not exactly the same topic, but it is not currently possible to download the express edition of Sun Studio due to an error that occurs when submitting an email address. The error given (from http://subscriptions.sun.com/util/sunmail.jsp) is:
    Error  :  Requested action failed for the email address [email protected]
    SunMailThread : nullAttempting to use the "Send Comments" link is also met with failure. After I fill out all the information, it sends me to a page with just the first and last name fields highlighted, as if to tell me they need to be filled in (yet - they are), but there is no form to submit on this page. Hence, I am stuck.
    So, I come here in hopes that both these problems get fixed sometime!

  • Starting Point for Internal Candidates in E-Recruitment

    Hi Experts,
    We recently upgraded our E-REC to SAPK-60405INERECRUIT.  I noticed that hrrcf_a_startpage_int_cand is now inactive.
    Is hrrcf_a_startpage_int_cand the starting point that you use for all your internal candidates, or is there another option?
    Thanks in advance.
    Shane

    Hello Shane,
    I assume you have the effect that after importing the support package the ICF service went from active to inactive. This has nothing to do with the support / usage of this ICF service. It is a technical behaviour that ICF services or complete subtrees of services can change from active to inactive during release upgrade, on applying a support package or even when transporting an ICF service.
    So you should add "checking the state of ICF services" to your patch checklist as it is something you should always verify, same like run the SGEN, invalidate the http server caches or adjust the otr text contexts.
    Kind Regards
    Roman

  • Enhancement Point Creation in Internal table

    Hi,
    I want to create a Enhancement Point in Internal table declared in Customize Program.
    This is more related to clarification of concept related to Enhancment Point.
    But when i am putting the cursor inside the internal table and right click and Enhancment -> create ,it is giving me a message
    that "Position of enhancement section/point statement is not allowed".
    This means that we can't create Enhancement point or Enhancement Section inside the Internal table and solution is we can use
    only Implicit Enhancement point.
    But the doubt is that i had seen SAP programs where they have created the Enhancement point in the internal table declarations.
    How that is possible then?
    Please provide your helpful answers to get me more clarification on Enhancement Point/
    Thanks,
    Manish

    Hi Afzal,
    Below is the code from standard program :-
    DATA: BEGIN OF lbbes OCCURS 10,        "Tabelle für LB-Bestände
            lifnr LIKE ekko-lifnr,
            matnr LIKE mdpm-matnr,
            werks LIKE mdpm-werks,
            charg LIKE lifbe-charg,        " SC-batch: Key-Feld
            lgort LIKE resb-lgort,         " SC-batch
            lbmng LIKE lifbe-lblab,        "LB-Bestandsmenge
            erfmg LIKE mdpm-bdmng,         "Verfügbare Menge
            erfme LIKE mdpm-lagme,         "Basismengeneinheit
            wamng LIKE mdpm-bdmng,
            waame LIKE mdpm-lagme,
            vstel LIKE tvstz-vstel,
            ladgr LIKE marc-ladgr,
            sernp LIKE marc-sernp,
            lblfa LIKE t161v-lblfa,
            bdmng LIKE mdpm-bdmng,   "sum of dep. requirements from SC POs
            bdbam LIKE mdpm-bdmng,   "sum of dep. requirements from SC req's
            rsmng LIKE mdpm-bdmng,         "sum of transfer reservations
            slbbm LIKE mdpm-bdmng,   "sum of third-party SC requisitions
            slbmg LIKE mdpm-bdmng,         "sum of third-party SC POs
            lfimg LIKE komdlgn-lfimg,      "sum of open deliveries
            maktx LIKE mdpm-maktx,
            selkz LIKE sy-calld.
    ENHANCEMENT-POINT rm06ellb_03 SPOTS es_rm06ellb STATIC.
    $$-Start: RM06ELLB_03----
    $$
    ENHANCEMENT 3  /CWM/APPL_MM_RM06ELLB.    "active version
    DATA:   /cwm/waame LIKE mdpm-lagme,
            /cwm/lbmng LIKE lifbe-lblab,    "LB-Bestandsmenge in ParallelME
            /cwm/erfmg LIKE mdpm-bdmng,     "Verfügbare Menge in ParallelME
            /cwm/erfme LIKE mdpm-lagme,     "ParallelME
            /cwm/meins LIKE mdpm-lagme,     "CW-BasisME
            /cwm/bdmng LIKE mdpm-bdmng,     "sum of dep.req.< SC POs in PME
            /cwm/lfimg LIKE komdlgn-lfimg,  "sum of open deliveries in PME
            /cwm/rsmng LIKE mdpm-bdmng,     "sum of transfer reservations
            /cwm/slbbm LIKE mdpm-bdmng, "sum of third-party SC requisitions
            /cwm/slbmg LIKE mdpm-bdmng,     "sum of third-party SC POs
            /cwm/bdbam LIKE mdpm-bdmng.  "sum of dep. req´s from SC req's
    ENDENHANCEMENT.
    $$-End:   RM06ELLB_03----
    $$
    DATA:
          END OF lbbes.
    Now in the internal table lbbes they have created the enhancement point and in implementation of enhancement point they have declare some extra fields.This is not a implicit enhancement but it is a explicit enhancment implementation with the help of enhancement point.
    Similarly if i have to do in my customize program then how to go ahead?
    I knew that it is possible with Implicit Enhancement point and i can implement that also.
    Let me know your views about this.
    Thanks,
    Manish

  • BAPI KPF6 POST PLAN COST FOR INTERNAL ORDER AND COST ELEMENT

    Hi all gurus,
    I would like to use in a custom report a BAPI/Function Module that help me to simulate KPF6 in order to post planning costs for internal order and cost element (layout 1-401).
    So the input should be:
    1) Version
    2) period from
    3) periodo to
    4) year
    5) internal order n.
    6) cost element n.
    7) value
    I found a lot of BAPI but don't know the correct one and how to use it (example how to fill the input value).
    Can anyone help me on that?
    Kind Regards

    In additio  to the previous I found the BAPI_COSTACTPLN_POSTPRIMCOST but don't know if it's the correct one and how to use it (some example fitting the my case will be very appreciated).
    If the quoted BAPI is correct.
    I tested it filling all fields as following:
    HEADERINFO:
    CO_AREA=FFCA
    FISC_YEAR=2008
    PERIOD_FROM=001
    PERIOD_TO=012
    DOC_HDR_TX='blank'
    INDEXSTRUCTURE:
    OBJECT_INDEX=000001
    VALUE_INDEX=000004 (hope this point at Interna Order)
    ATTRIB_INDEX=000000
    COOBJECT:
    OBJECT_INDEX=000001
    ORDERID=ZO53-08IMZ
    TOTVALUE:
    VALUE_INDEX=000004
    COST_ELEM=3224048
    FIX_VALUE= 200,0000
    DIST_KEY_FIX_VAL=2
    The Return table is set to 0. Nothing happens.....I suspect something related to indexstructure or index is wrong..
    Could anyone help me on that?
    Kind Regards

  • While settlment of internal order down payment settled

    Dear All,
    We have made a down payment to vendor by using f-48 given reference of Internal Order & P.O Number, but while settlement of internal order to AUC Down payment also settled.
    How to exclude Down Payment?
    Regards
    Vishvas B

    Hi Jigar
    I will brief You the background
    Scenerio 1
    When we ar Trying to Book Advcance for Captial (Sp GL type "M")
    We need to to book against PO no But it is not coming in "M scenario
    PLs configure it as reqd.
    Solution
    so I changed the field status, PO order Optional entry
    Now client put P.O No & Internal Order No. in down payment made
    Point 2
    Internal Order can not settled
    error was Transaction type entered belongs to transaction type group 15  the asset you are posting belogs to asset class AUC
    solution
    Solution
    OAYB
    Transaction type group selet 15 down payment allowed all AUC
    OKEP
    Down payment  Default cost element
    Now I reversed the above setting,
    what is the alternate for excluding down payment while settlement of Internal Order
    Thanks
    Regards
    Vishvas
    Vishvas

  • DocumentBuilder screams IOException when DTD ref in XML!

    Hi
    I have an interesting problem out here. I am using JAXP & Xerces. When I try and create a document object using the DocumentBuilder.parse(), I get an IOException, if the xml string contains a reference to the DTD. Infact another exception that I get to see is java.net.ConnectException: Connection timed out.
    BTW: I used xmlspy to validate the document and its fine.
    Code Snippet
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = null;
    Document
    try
    db = dbf.newDocumentBuilder();
    document = db.parse(new InputSource(new StringReader(xmlString)))
    catch(SaxException se)
    catch(IOException e)
    System.out.println(" IOException ... ");
    If the xml string has no reference to the DTD it works fine however with it the error.
    Any thoughts, anyone ??
    Thanks in advance
    ~Ed

    do you use an absolute path or a relative one to point to the DTD?
    the technique i use to ensure a succesful finding of my DTDs is to implement my own EntityResolver to point exactly where the files are - hence programmatically transforming relatives references "mydtd.dtd" to absolute ones "c:/project/files/mydtd.dtd".
    db.setEntityResolver(new EntityResolver() {
    public InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
    throws SAXException, java.io.IOException
      if (systemId.endsWith(".dtd"))
        return new InputSource(*** here point to the right folder + file ***);
      else
        return null;
    });

  • Broken orion-ejb-jar.dtd?

    I use the Ant task <xmlvalidate> in an EJB project to check the EJB XML deployment descriptors against their DTDs. Checking the (Sun-specified) "ejb-jar.xml" is fine. JDeveloper creates the OC4J specific deployment descriptor "orion-ejb-jar.xml" with a reference to the DTD located at "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd". Now this DTD seems to be broken.
    Firstly, the DTD seems to have an invalid syntax. I'm not a DTD expert but Ant complains about lines 279-281 of that DTD :
    279: isolation (commited | serializable | uncommited | repeatable_reads)
    280: CDATA #IMPLIED
    281: locking-mode (pessimistic | optimistic | read-only | old_pessimistic)
    286: max-tx-retries CDATA #IMPLIED
    287: update-changed-fields-only (true | false) "true"
    There seems to be an attribut missing altogether at line 280 (see line 286) so I deleted that line. Then for lines 279 and 281, Ant complained about missing quotes - apparently, such an "enum" needs to have a "default value" (as in line 287), so I manually added such a value for each line.
    The final error was in the "orion-ejb-jar.xml" (created by JDeveloper itself). Here is a piece of that:
    <orion-ejb-jar>
    <enterprise-beans>
    <session-deployment max-instances="-1" name="DiscountCalculator"/>
    I assume that the "max-instances" attribute sets the number of EJB instances in the OC4J pool to "unlimited". However, according to the DTD, session beans don't have such a "max-instances" attribute (lines 10-21):
    <!-- Deployment info for a session bean. -->
    ELEMENT session-deployment (env-entry-mapping*, ejb-ref-mapping*, resource-ref-mapping*)
    ATTLIST session-deployment call-timeout CDATA #IMPLIED
    copy-by-value CDATA #IMPLIED
    location CDATA #IMPLIED
    max-tx-retries CDATA #IMPLIED
    name CDATA #IMPLIED
    persistence-filename CDATA #IMPLIED
    timeout CDATA #IMPLIED
    wrapper CDATA #IMPLIED
    replication CDATA #IMPLIED
    >
    So I copied and pasted the instances attribute from the entity bean section.
    How come the DTD is broken? Even the 9.0.3 OC4J docs (http://download-east.oracle.com/docs/cd/A97688_08/generic.903/a97677/dtdxml.htm#620714) talk about all sorts of features (such as the "max-instances" attribute for session beans) and still points to the DTD "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd" that doesn't have these features at all.

    Karsten,
    In case you are still on it, I stumbled upon this some time ago, too. My best guess is that they miss entire phrase, which I put in bold:
    ....mmited | repeatable_reads ) "commited"
    disable-wrapper-cache CDATA #IMPLIED
    locking-mode ( pesim...
    (There is a line break between '"commited"' and 'disable-wrapper-cache'. 'commited', 'uncommited' must be MISSPELLED exactly as above.)
    Btw, max-instances and min-instances are in the DTD that ships with 9.0.3 (jarred in oc4j.jar). This DTD, however, is still broken in the way that you found (it won't even XML-validate). How do they go around this? go figure! Oracle documentation? we all know ...
    Best regards,
    bjk

  • How to write inline DTD  to the xml file?

    Hi All,
    I have java program which outputs a xml file! Currently I need to alter this program to insert inline DTD code in the output xml file.
    I want the xml file to look like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE students[
    <!ELEMENT firstname (#PCDATA)>
    <!ELEMENT ssn (#PCDATA)>
    <!ELEMENT student (ssn, firstname)>
    <!ELEMENT students (student+)>
    ]>
    <students>
    <student>
    <ssn>444111110</ssn>
    <firstname>Jacob</firstname>
    </student>
    </students>
    Existing file is as below:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE students SYSTEM "StudentsDTDfile.dtd">
    <students>
    <student>
    <ssn>444111110</ssn>
    <firstname>Jacob</firstname>
    </student>
    </students>
    The DOCTYPE line can be inserted into the xml using transfomer output key but then that always is for external dtd.
    It brings in the line <!DOCTYPE name SYSTEM " path"> .
    But i need an internal DTD. SO it should look like
    <!DOCTYPE name [<ELEMNETS>]>
    I am using DocumentBuilder class.
    Thanks in advance,
    Mathew
    Edited by: Mathew_Jacob on Jul 12, 2008 12:49 AM

    Or If Labview schema is acceptable, it is fairly straight forward.
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.

  • Getting the entire DTD  in the output file

    Hi All,
    I have a program that takes an XML file(has DTD and XML in the same file) as input. After parsing it, the output is written into a specified file. The output has first few lines of the DTD and the entire XML part, but is not having the ELEMENT and ATTLIST lines of the DTD.
    My code runs like this:
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setValidating(true);
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document doc = db.newDocument();
    db.setErrorHandler(new CustomErrorHandler());
    doc = db.parse(inFile);
    XmlDocumentxDoc = (XmlDocument) doc;
    xDoc.write(new PrintWriter(fos));
    TIA,
    sri

    The standard parsers don't seem to do a very good job with DTDs. I've used a package at
    http://www.wutka.com/dtdparser.html
    to build DTDs. I haven't found a better way to get an internal DTD into an XML document than to separately convert both to String and manually insert the DTD (with appropriate DOCTYPE, etc.) into the XML.

Maybe you are looking for

  • Automatic EMAIL creation upon CRM_ORDER creation (SOLMAN Service Desk)

    Hi All, We configured Service Desk in Solution manager and that uses CRM functionality. We created a ACTION PROFILE from copy of standard SLF00001 and created an entry for ACTION DEFINITION Z_SEND_MAIL_TEAM_ON_CREATION with all settings for automatic

  • Images selected in iPhoto remain on screen and visible in other apps

    Running iPhoto '09 and quite often when we select multiple images to share via iMessage or email, those images then stay on the screen and are visible no matter application you have active.  iPhoto becomes unresponsive and the only resolution is a fu

  • Portal session Timeout

    Hi, I want to increase the portal session timeout to 2hrs. We have 2 Portal server which are load balanced. The configuration is as below: Portal Version: 10.3.0.337003 .NET Version: 2.0 OS: Win 2003 Server Database : Oracle 11g IIS:6.0 On both the s

  • Cisco ACE Action Rewrite

    Hi, Can anybody help me to know the use of "action rewrite" command: policy-map type loadbalance first-match XXXXX class class-default     serverfarm YYYYYYY action REWRITE Regards, Thiyagu

  • Have a current movie on my computer and can't get it into ITunes so I can put on my IPad

    Have a current movie on my computer and can't get it into ITunes so I can put on my IPAd.  I tried dragging from desktop and nothing happens, also tried adding file or folder to library and nothing happens.