How to paste DTD in XML file. (not reference to .dtd file)

Hello!
I create XML file using DOM. How can I create DTD on the top of the file?
I need the DTD, not a reference to it. So the next method won't work.
transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, "Resources\\Settings\\projectFile.dtd") since it is paste a reference to .dtd file. It means that if user moves XML file to other place he need to move .dtd file also, and I don't want this method. I want paste next DTD
<!DOCTYPE project [
                    <!ELEMENT project (component*) >
                    <!ELEMENT component ANY >
                    <!ATTLIST component id  ID  #REQUIRED >
]>from the .dtd file on the top of my XML file. How can I do this?
Thank you.

I've found that by opening a inputstream to the XML file and wrapping it to filter the DTD out altogether and passing that inputstream to JAXB does the trick.
this seems actually faster, since it doesn't go off on the net to look for the dtd!
is this not catered for already somewhere??
thanks,

Similar Messages

  • Each time I start up my computer and have my iPhone plugged in, I get a message window that eads "New Wave" file not found in your files....How do I get this file I am missing?

    Each time I start up my computer and have my iPhone plugged in, I get a message window that eads "New Wave" file not found in your files....How do I get this file I am missing?

    Hey Podieboy,
    Thanks for the question. It sounds like you are receiving a message about missing files when you start iTunes. The following resource may provide more information:
    iTunes: Finding lost media and downloads - Apple Support
    http://support.apple.com/en-us/TS1408
    If the file/song is not important, you can simply delete it from your library to avoid this error message in the future:
    iTunes 12 for Windows: Delete songs, playlists, or other items
    http://support.apple.com/kb/PH20391
    Thanks,
    Matt M.

  • My LR 4 suddenly no longer recognized my memory cards. I am using the same cards and cameras but consisitently get the error message:"files not imported because the files could not be read. they are jpg and nef files...I am stuck without my workhorse! Any

    My LR 4 suddenly no longer recognized my memory cards. I am using the same cards and cameras but consisitently get the error message:"files not imported because the files could not be read. they are jpg and nef files...I am stuck without my workhorse! Any advice is helpful. This has never happened in 6 years

    answered in your other thread LR 4 suddenly no longer recognizes files.

  • Stranger error:Old file not found.However,a file of the same name was found

    Hi All,
    I appologise if its not the right forum...
    I am a bit baffeled here by the following error when I am trying to install Java SDK or just JRE.
    I upgraded my windows 2000 box to win XP home edition, installed the latest updates etc and then tried to install java....
    and got the following error
    bin\appletviewer.exe:
    Old file not found.However, a file of the same name was found.No updates done since file contents does not match.
    I have removed everything from system that I could imagine might be using Java directly or indirectly. No JRE on the system, no old java folder under C: drive etc, But I still get the same error. I have never come accross a stupid error like this before. Any help will be appreciated. Thanks
    Message was edited by:
    Khalid.Ali

    hunmm..thanks for the reply, I will try to find appletviewer.exe, however, my guess is that file should be there cus I am just trying to install it from standard java SDK installation.
    Yes I did not do checkdisk and I will do that and post my findings

  • Encode Video Files not working for avi files

    Hi,
    I've been trying to convert some .avi files to apple format using Lion's native 'Encode video files' function however keep getting a 'avconvert: source file not found for source file://fileparthhere avconvert: failed to create an export session. Check setup
    I can't work out why as this has worked before in Lion and works fine for other video formats. The only thing I've done is remove Final Cut Express HD and can't add it again as I don't own it anymore
    Suggestions? Is there a encoder to make this work or should it work anyway?
    Thanks

    If you click Yes the project file will be updated when you save it. That has nothing to do with the media.
    Are the Lesson and Media folders still in the Book Files folder (or whatever it's called)?
    Select one of the clips in the browser and use Edit>Item Properties. One of the first lines is Source. That gives you the file path for where your media is supposed to be located. What does it say? If nothing is there, use the File>Reconnect function and point the application to where the media is located.

  • How can I parse an XML string, (not an XML file)?

    Hi,
    I am using Xerces2 Java Parser 2.4.0,
    I wanta parse an XML string, not an XML file, but
    in the Parser class there is only following methods:
    parse(InputSource source)
    parse(java.lang.String systemId)
    thanks

    hi
      InputSource is = new InputSource(new ByteArrayInputStream(xmlSrc.getBytes()));
      HTH
    vasanth-ct

  • HT4527 My old mac book was backed up to a Time Machine drive.  That Macbook is dead.  I have a new Mac Mini.  How do I get the iTunes library (not just the music files but all other data...playlists, ratings, etc) on the new Mac from my Time Machine?

    My old Mac died. I had it backed up to a Time Machine external drive (fortunately).  I have a new Mac. I want to get my entire iTunes library from the Time Machine drive to the new Mac. I want not only the music files but all the "library" metadata, playlists, song rankings, unique genre designations. How do I do this?

    No backup is a huge mistake.
    You can redownload some itunes purchases in some countries:
    Downloading past purchases from the App Store ... - Apple - Support

  • In PI how do I convert the XML payload (input) to a text file and send out

    I am extracting data from SAP and sending thru XI / PI to a file (non-sap system).
    On the receiving end, I need the file to be a text file, with one row for each "FTZ_Row concatenated_data" tag in the input.  It needs to be just a plain text file with no XML tags.
    Currently the file gets one record which matches exactly to the XML payload below.
    I want it to create a file that looks like this :
               CONCATENATED DATA 1
               CONCATENATED DATA 2
                012345678912345678MAKTX-TEST LB 123123123123 01/02/2009 Z001WCHA9876543210.12
    here is the payload going thru XI
      <?xml version="1.0" encoding="utf-8" ?>
    - <n0:FTZ_Concatenated_Row xmlns:n0="http://intel.com/xi/INTEL_PROCUREMENT/ForeignTradeZone" xmlns:prx="urn:sap.com:proxy:FI0:/1SAI/TAS0C0412CDBC3E782D0219:700:2008/06/25">
      <FTZ_Row concatenated_data="CONCATENATED DATA 1" />
      <FTZ_Row concatenated_data="CONCATENATED DATA 2" />
      <FTZ_Row concatenated_data="012345678912345678MAKTX-TEST LB 123123123123 01/02/2009 Z001WCHA9876543210.12" />
      </n0:FTZ_Concatenated_Row>
    thanks
    jay

    thanks for the input but I am still having issues - I get an empty file when I use the content conversion option.
    My payload coming into XI is :
            <?xml version="1.0" encoding="utf-8" ?>
    - <n0:FTZ_Concatenated_Row xmlns:n0="http://intel.com/xi/INTEL_PROCUREMENT/ForeignTradeZone" xmlns:prx="urn:sap.com:proxy:FI0:/1SAI/TAS0C0412CDBC3E782D0219:700:2008/06/25">
    <FTZ_Row concatenated_data="CONCATENATED DATA 1" />
    <FTZ_Row concatenated_data="CONCATENATED DATA 2" />
    <FTZ_Row concatenated_data="012345678912345678MAKTX-TEST LB 123123123123 01/02/2009 Z001WCHA9876543210.12" />
    </n0:FTZ_Concatenated_Row>
    Here is the layout of my data type - I am using the same for input & output
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://intel.com/xi/INTEL_PROCUREMENT/ForeignTradeZone" targetNamespace="http://intel.com/xi/INTEL_PROCUREMENT/ForeignTradeZone">
       <xsd:complexType name="FTZ_Concatenated_Row">
          <xsd:sequence>
             <xsd:element name="FTZ_Row" maxOccurs="unbounded">
                <xsd:complexType>
                   <xsd:attribute name="concatenated_data" type="xsd:string" />
                </xsd:complexType>
             </xsd:element>
          </xsd:sequence>
       </xsd:complexType>
    </xsd:schema>
    I mapped these items :  FTZ_Concatenated_Row & FTZ_Row & concatenated_data
    I set up my content convesion with :
      recordset structure   FTZ_Row
    FTZ_Row.fieldSeparator     #
    FTZ_Row.endSeparator     'nl'
    I am not sure why the following row looks like this ??
        <FTZ_Row concatenated_data="CONCATENATED DATA 1" />
    I thought FTZ_Row would be one tag and "concatenated_data" would be another one.
    any help would be appreciated.
    I have read many entries/blogs/etc in SDN but and tried many different setups, but nothing is working.
    thanks

  • XML Format not poper For receiver File Adapter

    I am using XML File to xML File scenario. My receiver is SAP R/3 system. When I send file from another system, It is properly seen in payload but the file is not properly recived on SAP R/3. The XML File appears on single line and when seen on SAP side side the fileis cut after some length. Any help is appreciated.

    hi,
    >>>The XML File appears on single line and when seen on SAP side side the fileis cut after some length. Any help is appreciated.
    it's probably not the XML file file that is corrupter but the way you view the file
    do you open it from AL11? if so it does not show the whole file
    PI/XI does not cut XML files for sure
    Regards,
    Michal Krawczyk

  • HT201303 how to remove credit card   i do not want one on file

    how to remove credit card   i do not want one on file

    On your computer's iTunes you should be able to edit your payment info by going into the Store > View Account menu option and logging into your account, and on your account's details page there should be a payment link.  If you are doing it on an iOS device (iPad, iPhone or iPod Touch) then you could try tapping on your id in Settings > Store (Settings > iTunes & App Store on iOS 6+) and selecting 'View Apple ID' on the popup - that should also give you a payments link on your account's page.
    Changing payment info : http://support.apple.com/kb/HT1918

  • File not getting picked by File CC

    Hi Experts,
    Q1)An issue in files not getting picked up by communication channel in an inbound scenario  R/3<XI<-File Port
    Retry interval started. Length: 120.0 seconds
    7/24/09 1:33:14 PM   Error occurred while connecting to the FTP server "XXX.XXX.XX.webdti.com:21": java.net.SocketException: Connection timed out:could be due to invalid address
    7/24/09 1:32:00 PM   Processing started
    Any Quick helps highly appreciated.
    Q2)How can i restart an file adapter?
    Thanks,
    Sudhansu

    Hi Sudhanshu,
       Regarding your first question, check if you are able to  access the file port manually typing the ftp address in internet explorer or any browser.
    Regarding your Q2, read this:
    http://help.sap.com/saphelp_nw70/helpdata/en/1b/d5ef3b1ad56d4fe10000000a114084/content.htm
    (CTRL+F for "To restart the adapter")
    Regards,
    Ravi

  • EDI  X12 scenario,deq.bat file not generating any trace file.

    hello,
    i have worked on the EDI X12 over internet(AS2) Transaction,everything is working fine until the creation and deployment of configurations on both Acme and GlobalChips servers.But During the Verification of Purchase Order Transactions when i am running deq.bat file on both Acme and GlobalChips servers the dq script is not generating any t1.trc trace file.
    There is no problem with the Trading Partners on both servers they are on upstate,can anyone help me with this issue please,its very urgent.
    note: where will be the web.xml file for transportServlet located,can anyone provide me with the file path.
    thnx
    sunny

    Hello Sinkar,
    Thanks for your reply,Finally i have managed resolve the issue(deq.bat file is generating t1.trc file) successfully.But there are certain other issues regarding this topic in which i need your help.
    When i am running the deq.bat file in command prompt on both acme and globalchips servers it is showing the following status
    D:\oracle\OraJ2EE\ip\tutorial\X12\runtime&gt;deq.bat
    D:\oracle\OraJ2EE\ip\tutorial\X12\runtime&gt;java oracle.tip.adapter.b2b.data.IPDeq
    ueue ipdequeue.properties
    IPDequeue start...
    Dequeue from IP_IN_QUEUE
    and it also generated a t1.trc file on both servers,but the prompt in which i have run deq.bat is not giving any further message
    i.e some thing like IPDequeue end.
    and not even coming back to the original path i.e
    D:\oracle\OraJ2EE\ip\tutorial\X12\runtime&gt;
    and even if close the prompt it is not showing anything in t1.trc file and if i am running the enq_850.bat in acme server it is showing following stat
    D:\oracle\OraJ2EE\ip\tutorial\X12\runtime&gt;enq_850.bat
    D:\oracle\OraJ2EE\ip\tutorial\X12\runtime&gt;java oracle.tip.adapter.b2b.data.IPEnq
    ueue enq_850.properties
    IPEnqueue start...
    IPEnqueue end.
    D:\oracle\OraJ2EE\ip\tutorial\X12\runtime&gt;
    and its didn't showing anything in the t1.trc file generated on the globalchips server and same thing is happening when i am running enq_855.bat file on the globalchips server its not showing up anything in the trace file generated on the acme server.
    I have tried one thing that u have suggested for such kind of issue(t1.trc empty) in your forums
    1.) I have applied the patch #6673231 and it is showing the Document Routing Id Field in the B2B UI,but when i am completing all the process in B2B UI and running deq.bat file the result is still the same,the IPDequeue is not ending
    But a certain change has taken place after applying the pat
    D:\oracle\OraJ2EE\ip\tutorial\X12\runtime&gt;java oracle.tip.adapter.b2b.data.IPEnq+
    ueue enq_850.properties+
    IPEnqueue start...+
    Action Name = null
    IPEnqueue end.+
    D:\oracle\OraJ2EE\ip\tutorial\X12\runtime&gt;+
    C:\oracle\OraJ2EE\ip\tutorial\X12\runtime&gt;enq_855.bat+
    C:\oracle\OraJ2EE\ip\tutorial\X12\runtime&gt;java oracle.tip.adapter.b2b.data.IPEnq+
    ueue enq_855.properties+
    IPEnqueue start...+
    Action Name = null
    IPEnqueue end.+
    C:\oracle\OraJ2EE\ip\tutorial\X12\runtime&gt;+
    I Think that no action is taking place in both the cases
    bcoz its showing this Action Name = null+
    if that is the case what is the problem here
    I have also set oracle.tip.adapter.b2b.DocumentRouting=true.
    but the situation is still the same,please read the above problem carefully and suggest a solution which would be fruitful for my further progress.
    thanks
    sunny
    Edited by: user10470973 on Dec 16, 2008 10:43 AM
    Edited by: user10470973 on Dec 16, 2008 10:44 AM

  • Adobe XMP Files not deleted with Raw Files in ACR

    I am using Photoshop CS3 on a Windows XP platform. My camera raw files are mostly kept on a Windows 2003 file server, which has a gigabit connection to my workstation. However, I have the same problems when using PS CS3 on my Windows XP laptop.
    I take many hundreds of 'technical' photographs using an Olympus E1 and Canon G9 cameras. I usually bracket the exposures on the E1, specially when photographing white painted yachts, and then rate and select the images that I want in ACR 4.1.1. Unwanted images are deleted at this time.
    The problem I am having is that the associated *.xmp files are not always deleted with the camera raw files, with the result that I now have literally thousands of these 'orphaned' files cluttering up the server. The only options I have are to delete the files manually, which is a pain, or to leave them on the server, wasting unnecessary space.
    I have the same issue with Canon and Nikon raw files, so this problem is not specific to Olympus files.
    This is a long standing problem, and I would be grateful if anyone has any answers?
    If any Adobe programmers are watching, it would be handy if you could provide a simple utility to delete orphaned *.xmp files, or at least compress them into some kind of archive.
    Thanks,
    Nigel.

    [quote] As far as Photoshop and ACR go, ALL raw files are treated as read-only.
    Your original raw files remain untouched, no matter what you do to them.
    Any adjustments you make to a raw file are kept only as metadata (flags, if you will) in that XMP side-car file. Every time you want to re-open that raw image file, ACR will reach for the XMP file and apply the adjustments automatically, transparently. [/quote]
    That is not quite correct. Camera RAW files can be permanently deleted from within Adobe Camera Raw. The problem with ACR 4.1 to 4.4 4 was that the XMP files were left behind. This now seems to have been rectified in the latest version (ACR 4.5).
    Thank you Adobe!

  • Audio files not embedding with .avi files in CS4

    I am working on a project in Premiere Pro CS4. I successfully captured with firewire a number of clips and the audio embedded with the clip ( one .avi file shows up in explorer under the project. When I went back into the project, first, there was no audio captured at all and I did'nt notice until I had captured half of the clips (45 minutes). I don't know what happened there. Now, the audio is attached to the .avi file, but is not embedded like the previous captured files.   Example First capture: File Name : Harlem 01.avi  audio is embedded   2nd Capture  Guilford 01.avi  and Guilford 01. Stereo 1.wav
    Why aren't the .avi files and the audio files embedded and combined as one file anymore?
    Thanks for any help.
    Jimi

    >Matrox card
    The comment I have often seen is to the effect that "a Matrox card makes a good door stop"
    For a Firewire transfer you don't need any "card" at all, only a Firewire port... usually on the motherboard
    That said... and you mentioning switching back and forth between different Matrox modes... I would guess that, yes, you selected a wrong option
    But, since I don't use Matrox, I have no idea what setting could be wrong (I do use a Pinnacle Dv500 via dual boot with WinXP to digitize some old VHS tapes before they stop playing... but once I had settings that worked to create AVI files that ARE Audio Video Interleave with everything in one file, I have never changed any of the Dv500 settings)

  • File not getting deleted using File.delete()

    Hi guys,
    I have a code like this:
    File tempdir = new File("tempdir");
    tempdir.mkdir();
    File temporaryFile = new File("tempdir\tempfile.txt");
    FileWriter writer = new FileWriter(temporaryFile);
    // write data into file
    writer.flush();
    writer.close();
    try {
        // Do something
    catch (Exception e) {
        // Do something
    temporaryFile.delete();
    tempdir.delete();The program runs successfully. The directory and the file is created and data is written successfully into it. However, the file as well as directory is not getting deleted at the end of the program. I tried temporaryFile.deleteOnExit(), but this also didn't help.
    Can anyone provide some input as to what can be the possible reasons for the file not getting deleted?
    Thanks..

    I want the file to be created inside the directory I specified. Hence, I put the "\". Please let me know if there is some other way to achieve this. This way I am getting the file created at the location I want.
    One more interesting thing which I noticed. Actually this code is part of a JUnit test. In the same JUnit, I am creating new files in atleast 2-3 test methods. But the deletion of files is really random. Sometimes, 2 out of 3 get deleted, sometimes only 1 gets deleted. However, I didn't come through a single instance wherein all the 3 files got deleted. :-(
    Also, the directory is never deleted. However, I got the reason behind this. As per the File API, the directory will not be deleted if it is not empty.

Maybe you are looking for

  • FireWire 400 slowdown

    I was testing some notebook drives on the FW400 port of the MacBook pro. Average write speed = 32MB/s Then I tested all those same drives (in FW400/USB2 enclosures) on the USB 2.0 port. Average write speed = 20MB/s. I went back to test the drives aga

  • Method CreateAttachment missing from BUS1505

    Hi ronit and all,     as you have mentioned to refer method CreateAttachment of BO BUS1505..but i have checked  in 2-3  different  servers  in ECC 6.0 that  this BO BUS1505(Real Estate Contract (RE-FX)) is there but there is no method like CreateAtta

  • How do I print duplex via AppleScript?

    Hello - I am new to applescript and having a bit of difficulty trying to get started. My initial goal is fairly straightforward: each day (via an iCal action) download a specific URL and print it. Specifically, it's my daily newspaper and I'd like it

  • "Detect Cuts" not really working

    I'm scoring a scene that has very tight and deliberate cuts. To move things along, I brought the video directly in Logic (usually on a seperate PT rig) and I selected the "detect cuts" button in the Video global track, with plans to then play with "b

  • Working with midi data and automation data, assigning parameters

    I have a midi file with CC data in it. Controller 7 (volume) Controller 1 (mod) On page 600 the manual explains converting midi controller data to automation and vice-versa. I don't see any info on how to manage what CC data is mapped to what automat