How do you Append XML to an existing document?

Hi there, I need to to append an existing XML document to a new XML document. How is this done?
Is there an easy way of attaching one XML document to another?
If not, do I need to parse the existing XML and add it to the new document, element by element?
My existing XML is received as an input string and I need to include it in the new document.
Thanks in advance
Michael

Hi there, I need to to append an existing XML document
to a new XML document. How is this done?
you can use JAXB to do this. unmarshall(), validate() and marshall() belonging to java intepretion of xml document.
To eloborate further, say u have xml document as
<book>
<author>...</author>
</book>
JAXB helps u to get java intepretion of xml document by converting it into Book class and Author class.
And, say u want to add new authors, u need to add Author objects to Book object and then pass Book object to marshall() method.
The xml document will be appended with the author u added.
Hope this helps.
Jatin

Similar Messages

  • How do you pass XML as a URL param?

    How do you pass XML as a URL param?
    Thanks!

    I don't know why I wasn't thinking about this when I made my
    last post. If they're pasting some XML into a form, that's one
    thing. But if they need to send XML to your site from their own,
    you can setup a Coldfusion Component (CFC) as a Web Service to
    accept XML through a WSDL call.
    Check out the
    Coldfusion
    Developers Center for
    articles
    on creating web services

  • How do you use timeline in a pages document? I need to restore a document from earlier?

    How do you use timeline in a pages document?  I need to restore a document from earlier today?  How do I bring up the time - scale?

    View and restore past versions of documents

  • [Ai-CS4] How to add an  art board to existing document ?

    hi all,
    can anybody suggest me how to add a new artboard to existing document? I didn't find any ArtBoard Palette in CS4. But in CS5 it is given.
    thanks,
    D.A

    The Artboard panel is new to AiCS5. In CS4, a new artboard can be added by doing either of the two:
    1. Pick the Artboard Tool and click-drag it in the canvas area of the Illustrator document.
    2. Pick the Artboard Tool, click on the 'New Artboard' button in the Control Panel. Then select the desired size from the list of Artboard Presets in the Control Panel and then click in the desired area of the canvas to add a new Artboard.
    Hope this helps.
    Neeraj

  • How to import a XML file into the document?

    Hai,
    i had created a table using xml file....
    Now i want to import that xml file tabel into the document...
    Can any one tell me how to import the xml file into the document?
    thanks
    senthil

    Hai...
    this is senthil...
    i'm beginner for creating adobe indesign plugins..
    i want to import a html file in the document...
    i want to create a table by using html tags and
    that table will be imported into the document..
    How shall i do it?
    can any one plzz explain me?

  • How do you print a size 2 font document on a 4 X 6 index card?

    How do you print a size 2 font document on a 4 X 6 index card?

    Some printers have a print odd or even numbered pages setting. See if yours does. Do a ⌘ + P and select 'paper handling from the pull down menu to see if your printer has this feature.
    Kurt

  • How I can append new node in existing  XML file

    I've just begun learning DOM XML , so I'm currently at a very beginner level.
    I have an existing XML file that I would like to add an additional node to before saving it to another variable.
    how I can append new node in this file.
    now this code is overwrite new data over old data
    The code looks like this:
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.transform.Result;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.TransformerFactoryConfigurationError;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Attr;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    public class VerbXMLWriter
        static String EVerb3;
        static String englishTranslate3;
        public void VerbXMLWriter(String EVerb, String englishTranslate )
             EVerb3 = EVerb;
             englishTranslate3=englishTranslate;
        File xmlFile = new File("VerbDB.xml");
        DocumentBuilderFactory factory =  DocumentBuilderFactory.newInstance();
        try
         DocumentBuilder builder = factory.newDocumentBuilder();
         Document document = builder.newDocument();
        Element root = document.createElement("Verb");
         document.appendChild(root);
         Element verb = document.createElement(EVerb3);
         verb.setAttribute("EnglishTranslate",englishTranslate3);
         root.appendChild(verb);
         Source xmlSource = new DOMSource( document );
         Result result = new StreamResult( new FileOutputStream(xmlFile) );
        TransformerFactory transformerFactory = TransformerFactory.newInstance();
        Transformer transformer =
        transformerFactory.newTransformer();
        transformer.setOutputProperty( "indent", "yes" );
         transformer.transform( xmlSource, result );
      catch(TransformerFactoryConfigurationError factoryError )
        factoryError.printStackTrace();
       catch (ParserConfigurationException pc)
           pc.printStackTrace();
       catch (IOException io)
          io.printStackTrace();
       catch(Exception excep )
           excep.printStackTrace();
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <Verb>
    <Play EnglishTranslate="playing" />
    </Verb>Edited by: itb402 on Mar 9, 2008 6:05 AM

    in your code you are already appending new nodes to the root node. so what exactly is your problem? The following steps are usually taken for appending a new node:
    1. Read the XML document
    2. Build a DOM tree
    3. Navigate to the node under which you want to insert the new node
    4. Create a new node.
    5. Insert the new node to the node selected in point #3.
    ~Debopam

  • How do I add XML content to existing FrameMaker Document

    Hello,
    I have an XML document that contains features of one item and I want to add data from it to FM document that shows those features. These features have been added to FM previously by copy-paste technology which isn't obviosly the fastest way and I have understood adding them automatically is possible.
    I can read XML well and I can produce XSLT files to make another XML files, problem is that I'm a little beginner with FM and help files didn't show any good examples of this (or at least I didn't find). I tried to do some read/write rules, because it seemed to be the way how FM handles these things but they didn't work.
    So shortly: XML file (data) + FM file (tables and such) = FM file which have XML data in its tables
    I would appreciate any help, like pointing to right help files or such, thanks in advance.

    The two main references you need are:
    Developing Structured Applications with FrameMaker, Guide
    Developing Structured Applications with FrameMaker, Reference
    They used to ship with FrameMaker, but you can download them from the Adobe site. Check the Support section. I do not believe they are available for FrameMaker 10 yet, but they are for version 9. No matter your FramMaker version, almost any set will do.
    Basically, you need an XSLT that will translate the XML structure into the structure you use in your FrameMaker files. You need a set of read/write rules (see the references above). FrameMaker uses read/write rules to specify how certain FrameMaker objects are to be translated from the XML. Such objects include tables, variables, and markers.
    Then you need to create a structured application that specifies where the XSLT, the read/write rules, and your structured template are located on you system.Again, see the references.
    Once all of the above is in place, you open the XML file from within FrameMaker. FrameMaker will ask you what structured application to use, which you pick from the dropdown list. It will then open the XML file, apply the XSLT transformation, and copy the result into your structured blank template. That process will likely list several errors, which you may or may not be able to ignore depending upon the resulting FrameMaker document. In my case, these are usually errors about missing graphics, which I already know are missing.
    The result is ONE FrameMaker file. You can then copy and paste the information where ever you need it in your other documents. I am not sure whether you can import an XML file into an existing Framemaker document, much like a text inset. Maybe others will know.
    Good luck,
    Van

  • How do you move new photos into existing albums?

    On an iPad how do you move a new photo into an existing album?

    Or, from the camera roll:
    Tap Select (upper right hand corner)
    Tap the pictures you want to add to an album (you'll see a check mark in each selected photo)
    Tap Add To (upper left hand corner)
    Your albums will appear and touch the album you want to move the picture to and they'll go there
    Note:  They will stay in your Camera Roll as well

  • How do you validate XML file against a Schema?

    Are there free applications that does that?

    Thanks, but how do you validata the Schema itself, which is an XML file.
    I know the schema DTD is online, but still I need some utility to do it
    Thanks

  • How do you scan pages into an existing PDF document?

    Older versions of Acrobat would let you scan additional pages right into the currently opened PDF file and would ask do you want to insert before/after document start and after a certain page number.
    Now we have the newer version of Adobe and I have found out that you scan scan a document into a new PDF file and save it and then import it into the currently open PDF but isn't there a way to do this direct without creating a new PDF file like the older versions did?
    Thanks

    Hello!
    To scan directly into the pdf file should go to:
    Panel "Tools" / Insert  Pages / More Insert Options / Insert from Scanner / ...
    You can also right-click the tool "More Insert Options" and select Add to Quick Tools.

  • How to get an xml string into a Document w/o escaping mark-up characters?

    Hi,
    I am using one of the latest xerces using Java. I am pretty sure I am using xerces-2.
    I have an existing Document and I am trying to add more content to it. The new content itself is xml string. I am trying to insert this xml string into the document using document.createTextNode. I am able to insert, but somewhere it is escaping the mark-up characters (<,>,etc). When I convert the document into String, I can see, for example, <userData> instead of <userData>.
    There is an alternative option to accomplish this by creating a new document with this xml string, get the root element, import this element into my document. Execution time for this procedure is very high - means, this is very bad in terms of time-wise performance.
    Can any help on how to accomplish this (bringing an xml string into a document without escaping mark-up characters) in time-efficient way.

    So you want to treat the contents of the string as XML rather than as text? Then you have to parse it.
    Or if your reason for asking is just that you don't like the look of escaped text, then use a CDATA section to contain the text.

  • How do i add information to an existing document

    how do i add information to an existing document

    Not sure what you mean.  What application are you trying to use?

  • In print preview - how can you have multipage previews of the document - 1 - 2 - 3- 6 - 12 page preview and so on so that you can see if the document is ok to print?

    WINXP - In Explorer you can have multi-page print previews from 1, 2, 3, 6 upwards to check and confirm that the document will print correctly to your needs - and does this across the screen format as opposed to down the page, so that you can see all 12 pages on your screen to quickly see that the print percentage is correct and all pages fall into the print area and so on - how can you set this up with Firefox, because printing with Firefox is so unstable, you don't know what to expect when printing a document or web page?

    No what I mean is how can you see many pages across the screen without having to scroll like in explorer where you can see 12 or more small pages on your screen without scrolling down, like tiled across your screen as opposed to vertical down the page. Thanks

  • How to change the title of an existing document?

    I have looked in online manuals and there are no headings for this.  I wish to change the title of an existing documents but can find no way to do so.  Any one have help on this? 

    You can also change the file name in Finder.
    peter

Maybe you are looking for

  • JButton

    I'm trying to assign an icon to a JButton, but it doesn't appears!!! the .gif file and the source .java file are located in the same folder. I tried with the constructor,and it stills not working. here's the fragment of the code:     protected JPanel

  • Archiving email into PDF portfolio

    I'm trying to set-up for archiving emails from my Outlook 2007 (Win) to one or more PDF Portfolios.  I have Acrobat Pto XI  v. 11.0.3  I made a test portfolio from a small number of emails and it works great-- fully sortable and easy to do-- the Adob

  • Required help on date functions

    Hi All, Any body give some idea to add start_date abd duration in the below SELECT hruserdt.get_table_value ( 346 , 'APPRAISAL_SETUP' , 'NOTIFICATION' ,'PLAN' , SYSDATE ) as start_date , hruserdt.get_table_value ( 346 , 'APPRAISAL_SETUP' , 'DURATION'

  • SPRO settings

    Hi experts, Is it possible that, 1)In development, shall we give only "view" option for SPRO to some users and "editable" option for some other users? 2)In the production, shall we make some transactions of SPRO editable ? This is because, i had obse

  • Details required to create scenarioes

    Hi Experts... i am a beginner in XI. can anyone provide me what are the technical details reqiured when we are developing a interface for all interfaces i.e. file, JDBC, SOAP, IDOC, proxy when thy act has senders as well as receivers. its a urgent ne