How to mention the "dtd" file when loading xml file

i am using the JAXP parser for parsing and loading my xml file.In the file i have mentioned the dtd like
<!DOCTYPE screensmanagement SYSTEM "scrReg.dtd">
But after doing some manipulations, when i save the file through JAXP parser at the same location from where i loaded, then "dtd header" is not saved with my xml File and when i again parse the xml file then parser does not find the "dtd" file coz it is not been saved with xml source.
How can i get aroud this problem.
Merry Chrismis

when serializing the DOM, use this: transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, scrReg.dtd");
Merry Chrasmas too ;-)

Similar Messages

  • How to register the .DTD file in Oracle Apps

    Hi,
    I am getting below error while generating XML file by concurrent program:
    Attaching XML file and .DTD file.
    Do I need to register this .DTD file somewhere?
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    System error: -2146697210. Error processing resource 'http://mbci-ebsdev.itciss.com/OA_CGI/label.dtd'.
    Below is the stored procedure I created to generate the XML file
    create or replace
    PROCEDURE Demo_XML_Publisher (errbuf VARCHAR2,retcode NUMBER,v_customer_id VARCHAR2)
    AS
    /*Cursor to fetch Customer Records*/
    CURSOR xml_parent
    is
    SELECT header_id,ordered_item
    FROM oe_order_lines_all
    WHERE header_id = v_customer_id;
    /*Cursor to fetch customer invoice records*/
    CURSOR xml_detail(p_customer_id NUMBER)
    is
    select a.order_number,a.header_id,a.order_type_id
    from oe_order_headers_all a,oe_order_lines_all b
    where a.HEADER_ID = B.HEADER_ID
    and a.header_id = p_customer_id
    AND ROWNUM<4;
    BEGIN
    /*First line of XML data should be <?xml version=”1.0??>*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<?xml version="1.0" encoding="UTF-8"?>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<!DOCTYPE labels SYSTEM "label.dtd">');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<labels FORMAT="order.btw" PRINTERNAME="KIMBALL1872A" _QUANTITY="1">' );
    FOR v_customer IN xml_parent
    LOOP
    /*For each record create a group tag <P_CUSTOMER> at the start*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<label>');
    /*Embed data between XML tags for ex:- <CUSTOMER_NAME>ABCD</CUSTOMER_NAME>*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<HEADER_ID>' || V_CUSTOMER.header_id
    || '</HEADER_ID>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<ORDERED_ITEM>' || v_customer.ordered_item ||
    '</ORDERED_ITEM>');
    FOR v_details IN xml_detail(v_customer.header_id)
    LOOP
    /*For customer invoices create a group tag <P_INVOICES> at the
    start*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<P_INVOICES>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<variable name= "Order_no">' ||
    V_DETAILS.ORDER_NUMBER || '</variable>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<variable name= "Headr_Id">' ||
    V_DETAILS.HEADER_ID || '</variable>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<variable name= "Order_Type_Id">'||
    v_details.order_type_id||'</variable>');
    /*Close the group tag </P_INVOICES> at the end of customer invoices*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</P_INVOICES>');
    END LOOP;
    /*Close the group tag </P_CUSTOMER> at the end of customer record*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</label>');
    END LOOP;
    /*Finally Close the starting Report tag*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</labels>');
    exception when others then
    FND_FILE.PUT_LINE(FND_FILE.log,'Entered into exception');
    END Demo_XML_Publisher;
    Below is the Label.dtd file structure m using:
    <!ELEMENT labels (label)*>
    <!ATTLIST labels _FORMAT CDATA #IMPLIED>
    <!ATTLIST labels _JOBNAME CDATA #IMPLIED>
    <!ATTLIST labels _QUANTITY CDATA #IMPLIED>
    <!ATTLIST labels _PRINTERNAME CDATA #IMPLIED>
    <!ELEMENT label (variable)*>
    <!ATTLIST label _FORMAT CDATA #IMPLIED>
    <!ATTLIST label _JOBNAME CDATA #IMPLIED>
    <!ATTLIST label _QUANTITY CDATA #IMPLIED>
    <!ATTLIST label _PRINTERNAME CDATA #IMPLIED>
    <!ELEMENT variable (#PCDATA)>
    <!ATTLIST variable name CDATA #IMPLIED>
    Thanks in Advance

    In any case, the dtd is incorrect and that may be why. The element structure is at least look like this.
    <!ELEMENT labels (label*)>
    <!ELEMENT label (CUSTOMER_NAME?, HEADER_ID, ORDERED_ITEM, P_INVOICES*)>
    <!ELEMENT P_INVOICES (variable, variable, variable)>If you want to keep some flexibility on variable's cardinality, you can simply it like this.
    <!ELEMENT labels (label*)>
    <!ELEMENT label (CUSTOMER_NAME?, HEADER_ID, ORDERED_ITEM, P_INVOICES*)>
    <!ELEMENT P_INVOICES (variable+)>Then you add the appropriate ATTLIST for the elements.

  • How to edit the nbu file when the mobile device is...

    How to edit the nbu file when the mobile device is not connected?
    That software that is available in the nokia site “nokia phone browser” is not useful! Why?
    It is not working unless the mobile device is connected (attached)
    It is quite slow when editing the contacts! (attached)
    Then why the nokia doesn’t offer a simple software that enable us to edit and explore the content of our nbu files?
    Is there some workaround in this regard?
    Is there some software the can edit the nbu files?
    Thank you for the help,
    Best
    Jamal
    Attachments:
    Clip_774.jpg ‏166 KB
    Clip_775.jpg ‏127 KB
    Clip_773.jpg ‏243 KB

    when serializing the DOM, use this: transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, scrReg.dtd");
    Merry Chrasmas too ;-)

  • How to avoid the dtd validate of the "iTunes Music Library.xml " when read?

    Hi all,
    In the article of What are the iTunes library files?("http://docs.info.apple.com/article.html?artnum=93732" ),there is something about the function of "iTunes Music Library.xml " of iTunes.I can get information by reading this xml file.But this file must be validated online(dtd validate).When the net is unconnected,the web exception may be threw.How to avoid the dtd validate of the "iTunes Music Library.xml " when read?Thank you.

    You can do this with YamiPod (Free)
    http://www.yamipod.com/main/modules/downloads/
    Or manualy:
    Here is a link to where it tells how to do this manualy:
    http://discussions.apple.com/message.jspa?messageID=797432#797432

  • How to delete the temporary files when we log out from ESS

    Hello expert,
    In my company we are running ESS using ITS server, do you know how to delete the temporary files when we log out from ESS?
    Thanks.

    The temporary files used by ESS. For example paystub pdf file.

  • How to load and display the external flv video files in dynamicly and the how to control the flv fil

    How to load and display the external flv video files in dynamicly using AS 3.0
    and  How to control the flv file  add the play paus button and add seekbar.
    I have using to load the flv file following code
    var flvPlaceHolder1:MovieClip = new MovieClip();
    var vid1:Video = new Video(734, 408);
    flvPlaceHolder1.addChild(vid1);
    addChild(flvPlaceHolder1);
    flvPlaceHolder1.x = 1059;
    flvPlaceHolder1.y = 152;
    var nc1:NetConnection = new NetConnection();
    nc1.connect(null);
    var ns1:NetStream = new NetStream(nc1);
    vid1.attachNetStream(ns1);
    var listener1:Object = new Object();
    listener1.onMetaData = function(evt:Object):void {};
    ns1.client = listener1;
    ns1.play("GV-1600 TURNING.flv");
    ns1.addEventListener(NetStatusEvent.NET_STATUS, statusChanged1);
    function statusChanged1(ns1:NetStatusEvent):void
             trace(ns1.info.code);
            if (ns1.info.code == 'NetStream.Buffer.Empty')
                 trace('the video has ended');
                 removeChild(flvPlaceHolder1);
                 //trace('removeChild');
                gotoAndPlay(1786);
    then how to add the play,paus ,full screen button    and   seekbar,volumebar.

    I have to Create the flash presentation for our company product
    In this presentation the left  side the text animation are displayed then right side the our product video is displayed.
    In this presentation i need the following option :
    1, The first product video and animation is finished then the next product is played
    2, then the video displayed  (size width and height 400x300) , I click this video to increase the size(ex:1000x700)
    3, then the playing video i control  it play, stop, paus button and volume bar, seek bar.
    4, then this presentation is displayed on 42 inches LCD TV so this full presentation is run full screen.
    I have finished first two steps 1 and 2
    the following are the screen short and code:-
    code :-
    var count=0;
    var flvPlaceHolder2:MovieClip = new MovieClip();   
    var vid2:Video = new Video(734, 408);
    flvPlaceHolder2.addChild(vid2);
    addChild(flvPlaceHolder2);
    flvPlaceHolder2.x = 1059;
    flvPlaceHolder2.y = 152;
    var nc2:NetConnection = new NetConnection();
    nc2.connect(null);
    var ns2:NetStream = new NetStream(nc2);
    vid2.attachNetStream(ns2);
    var listener2:Object = new Object();
    listener2.onMetaData = function(evt:Object):void {};
    ns2.client = listener2;
    ns2.play("GS-4000.flv");
    this.addEventListener(Event.ENTER_FRAME, BtnFadeIn2);
    function BtnFadeIn2(event:Event):void
        if (this.currentFrame == 387)
            /*flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
            trace('Screen size is changed');*/
            if(count==0)
            flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
            count++;
    ns2.addEventListener(NetStatusEvent.NET_STATUS, statusChanged2);
    function statusChanged2(ns2:NetStatusEvent):void
        trace(ns2.info.code);
        if (ns2.info.code == 'NetStream.Buffer.Empty')
                trace('the video has ended');
                 removeChild(flvPlaceHolder2);
                 //trace('removeChild');
                gotoAndPlay(433);
    flvPlaceHolder2.buttonMode=true;
    flvPlaceHolder2.addEventListener(MouseEvent.CLICK,home2);
    function home2(e:MouseEvent):void
        if(vid2.width==734 && vid2.height==408)
            flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
        else
            flvPlaceHolder2.x = 1059;
            flvPlaceHolder2.y = 152;
            vid2.width=734;
            vid2.height=408;

  • How to ignore the DTD in an XML file

    I am using XMLReader as
    XMLReader parser = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
    to parse an xml document. The XML has a <!DOCTYPE ....> in it which specifies a dtd file. If I do not have the dtd file on my local machine, the parser will fail. How can I tell the parser to ignore the <!DOCTYPE..> line, since I do not want it to validate against the dtd anyway?
    Thanks.

    just comment out the <!DOCTYPE> element and you will not have any problem and moreover the default behaviour of xerces is not to validate but see the well formedness .If you want to validate the xml document then do this
    parser.setFeature("http://xml.org/sax/features/validation" ,true);
    this will validate.
    hope this will help you

  • How to specify the database file path when create FDM application

    Dear All,
    How to specify the database file path (MSSQL) when create FDM application?
    Right now, all data file are placed in the D:\ . I want to specify the database files (log and mdf file) in other place. How to do it?
    Thanks.

    Where is the highS2.xml located on the disk? If you add it to your project you should set its Build Action to Content and its Copy To Output Directory to Always in Visual Studio:
    Please remember to close your threads by marking helpful posts as answer once your issue has been solved and then start a new thread if you have a new question.

  • How to list the JAR files loaded into the Oracle Database ?

    How to list the JAR files loaded into the Oracle Database ?

    From 11.1 onwards, the below two views are available to identify the jar files loaded into the Database.
    JAVAJAR$
    JAVAJAROBJECTS$
    By querying the JAVAJAR$ view you can know information about the JAR files loaded into the Database and using JAVAJAROBJECTS$ view you can find all the java objects associated with the given JAR file.
    These views are populated everytime you use LOADJAVA with "-jarsasdbobjects" option to load your custom java classes.
    But unfortunately this feature is available only from 11.1 onwards and there is no clear workaround for above in 10.2 or earlier.

  • How to see the .AS file that .MXML file is translated to before being compiled to SWF?

    I am trying to dynamically load some other Applications in
    one Application, use ActionScript but not SWFLoader tag, it looks
    like:
    <mx:Application>
    <mx:Script>
    <![CDATA[
    private var loader:SWFLoader = new SWFLoader();
    private function loadSWF(url:String):void{
    var baseURL:String = this.url.substr(0,
    this.url.lastIndexOf("/"));
    var url = baseURL + "/"+ name;
    //even if I did not add any event listener!
    loader.load(url);
    ]]>
    </mx:Script>
    <mx:Button label="B" click="loadSWF('Top_2.swf');" y="10"
    x="58"/>
    </mx:Application>
    then when me click the button, always occured an error like
    this:(even if every method I add try...catch... )
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at mx.core::UIComponent/
    http://www.adobe.com/2006/flex/mx/internal::updateCallbacks()[E:\dev\3.0.x\frameworks\proj ects\framework\src\mx\core\UIComponent.as:5043
    at mx.core::UIComponent/set
    nestLevel()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:2522]
    at mx.managers::SystemManager/
    http://www.adobe.com/2006/flex/mx/internal::addingChild()[E:\dev\3.0.x\frameworks\projects \framework\src\mx\managers\SystemManager.as:1583
    at
    mx.managers::SystemManager/initializeTopLevelWindow()[E:\dev\3.0.x\frameworks\projects\fr amework\src\mx\managers\SystemManager.as:2481]
    at mx.managers::SystemManager/
    http://www.adobe.com/2006/flex/mx/internal::docFrameHandler()[E:\dev\3.0.x\frameworks\proj ects\framework\src\mx\managers\SystemManager.as:2330
    however, if I use <mx:SWFLoader source="Top_2.swf" />
    tag, there is no such problem! So I think it must be I didn't init
    SWFLoader correctly!
    I hope someone can tell me how to crrect this mistake
    directly, but I more wish someone to tell me how to view the .as
    file that the .mxml file translated to before being compiled to a
    SWF( If there is a such step!)
    Thanks!

    Maybe the SWFLoader must be one child of one DisplayObject!??
    I found when the swfloader is been added to some
    DisplayObject in actionScript like below, the problem didn't occure
    any more.
    swfloader.visible = false;
    this.addChild(swfloader); // 'this' is current Application
    swfloader.addEventListener(".....", someHandler);
    swfloader.load("someurl");
    Why? Is this a bug or not?
    I am still waiting someone to tell me where a .mxml file can
    be translated to a .as file which could be visited!

  • How to change the default JRE when there are several version of JRE in Sys

    How to change the default JRE when there are several version of JRE in System?
    i have installed j2sdk1.5.0 then installed j2ee1.4,then installed Weblogic6.1 which use jdk1.3
    Now the JRE is jdk1.3\bin
    When run class that was compiled with jdk1.5,throw:
    java.lang.UnsupportedClassVersionError
    How can i change the jre to 1.5?

    There is a workaround to move from 1.5 version to the older 1.4 version. But this could be specific to the browser setting the JRE version.
    Excerpts from sun docs:
    However, a user can still run older versions. To do so, launch the Java Plug-in Control Panel for the older version, then (re)select the browser in the Browser tab.
    Example:
    Assume you are running on Microsoft Windows with Microsoft Internet Explorer, have first installed version 1.4.2, then version 5.0, and you want to run 1.4.2.
    Go to the j2re1.4.2\bin directory where JRE 1.4.2 was installed. On a Windows default installation, this would be here: C:\Program Files\Java\j2re1.4.2\bin
    Double-click the jpicpl32.exe file located there. It will launch the control panel for 1.4.2.
    Select the Browser tab. Microsoft Internet Explorer might still appear to be set (checked). However, when 5.0 was installed, the registration of the 1.4.2 JRE with Internet Explorer was overwritten by the 5.0 JRE.
    If Microsoft Internet Explorer is shown as checked, uncheck it and click Apply. You will see a confirmation dialog stating that browser settings have changed.
    Check Microsoft Internet Explorer and click Apply. You should see a confirmation dialog.
    Restart the browser. It should now use the 1.4.2 JRE for conventional APPLET tags.
    Details are here
    http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/jcp.html
    My system (Windows XP) has the version 1.5_09 set as the default. However i just installed JRE 1.5_06 and would like to revert back to _06 as the default JRE..
    Will update if i find more information

  • How to create the SWF file which was included surrogate pairs.

    I would like to make sure how to create the SWF file which are included surrogate pairs.
    The error of outside the scope of unicode occurred when I compiled(mxmlc) the as file which was set surrogate pairs to 'Unicoderange'.
    Ex, I set the '  '(UTF-16 is '20B9F') to 'Unicoderange'.
    However, I cannot add the surrogate pairs.
    The error of outside the scope of Unicode occurred when I compiled the AS file.
    The reason of error was that the Unicode(UTF-16) of surrogate pairs is invalid.
    Then, I read the following pages.
    These pages are written that unicode-range supported surrogate pairs.
    http://livedocs.adobe.com/flex/3/html/help.html?content=fonts_07.html
    http://www.w3.org/TR/1998/REC-CSS2-19980512/fonts.html#descdef-unicode -range
    So please let me know how to create the SWF file which are included surrogate pairs.
    Environment
    - Flex3.5a
    - TTC: meiryo(ver6.02), msgothic(ver2.50), mspgothic(ver2.50)
    Thanks,
    Takeshi Ishihara.

    I've been able to create project jar files in Eclipse by selecting Export from the File menu, then choose Java - Jar file - and provide the required information, name, destination folder etc. But when I do this, I do not export other jars on the build path this way nor do I expect to do this. I am only concerned with creating a jar file of my own work. A jar file does not "contain" other jar files. If the jar file contains the main method, and requires other jars for it's execution, then you may wish to include a reference to required jars on the class path entry of the Manifest file of the jar file you create. I'm not sure how to create a Manifest file in eclipse though..

  • How to disable the reminding dialog when close the webi report viewer

    Dear all
    How to disable the reminding dialog when close the webi report viewer
    Background
    When user close the webi report viewer in inforview by click the button in the right-top of the webi report viewer frame. It always prompt a dialog to remind user that the modification will be lost without saving.
    But customer need to disable this dialog, and can clost the report viewer directly.
    So is there any ways to modify this?
    I think it shoule modify some .js file under tomcat, but can not find the solution.
    Thanks a lot, any information woulde be appreciated.
    David Zhang

    I've had the same issue bugging me since installing Snow, er, lion, er, cat, er, cougar, er, Mountain Lion. Incredibly ANNOYING.
    It's stupid stuff like this and reverse scrolling that really turn long-timer users off. I'm personally glad Forstall got fired for blunders such as these.
    I'm serious peeved that turning off iCloud Documents & Data actually deletes documents and data locally. That's just incredibly stupid.
    MANY thanks mende1 for the answer on how to fix it.

  • How to download the exe file, rather then installing

        hi, as my working pc has very low internet connectivity, how can i download and take this installable file to my pc? because when ever i click on download flash builder 4.7 trail it starts installing rather then downloading and getting saved in some location.. please help me

    How to create the exe file for java project.Have you ever heard of google? I pasted your exact "question" into a google search:
    http://www.google.com/search?q=How+to+create+the+exe+file+for+java+project.
    and got several useful links.
    Better search terms might yield even better results.
    Sheesh.

  • How to read the properties file available in Server File structure in webdy

    hi all,
    I have developed one webdynpro application. In this application i need to access mdm server to continue. For getting the connection i need to pass the IP addresses.
    Can i have code  how to read the properties file which is residing in the server file. with out included along with the application. keeping some where in the file structure in the server. I want to read that properties file by  maintain the iP addresses and users in  properties file based on the key i want to read like below.
    servername="abcServer"
    username="john"
    password="test123"
    Please send me the code how to read this properties file from the file structure and how to read this values by key  in webdynpro application
    Regards
    Vijay

    Hi Vijay,
    You can try this piece of code too:
    Properties props = new Properties();
    //try retrieve data from file
    //catch exception in case properties file does not exist
    try {
             props.load(new FileInputStream("c:\property\Test.properties")); //File location
             String serverName = props.getProperty("servername"); //Similarly, you can access the other properties
             if(serverName==null)
               //....do appropriate handling
         }     catch(IOException e)
                   e.printStackTrace();
    Regards,
    Alka.

Maybe you are looking for

  • Can't receive email with Mail 4.4 - but iPad does

    Hi guys, I have a strange problem with Mail 4.4: I have multiple email accounts that I manage through Mail - all work fine except my gmail account, which stopped receiving emails about a week ago. Here are some details: 1. The account constantly show

  • Xbmc+nvidia+vdpau issues [SOLVED]

    I've been at this for 5 hours straight now, and i'm back to square one. I've tried xbmc-svn but that one didn't even have "vdpau" listed as an option, so I tried xbmc instead. And yes vdpau is showing up as an option but no matter what I try the scre

  • DB to DB replication

    Hi, I've a question regarding entire Oracle DB to DB replication. We are planning to use GG for upgrade, since it supports different version and almost zero downtime. we need to upgrade Oracle single instance 10g db to 11g single instance. Here is wh

  • JDBC, Using Dynamic SQL

    How to implement dynamic SQL (like dynamic SQL Method 4 in Pro*C), which lets program accept or build dynamic SQL statements that contain an unknown number of select-list items or placeholders?

  • ODBC conncetion issue.

    Hi, I am trying to automate my cache clearing from rpd side. I followed the bellow link. http://oraclebisolutions.blogspot.co.uk/2012/12/obiee-clear-server-cache-from-direct.html When I try to run the analysis it run without any error and even clears