Add an existing Element to a new Document

I want to use the appendChild and add an Element to a Document but when the Element comes from another Document it refuses to add it.
How can I add an already existing Element with all its children to a new Document? It seems that you can do that only with the elements that you have created with createElement of the new Document.

did it yesterday :-)
what I did was...
        Node tmpNode = document_destination.importNode(document_source.getFirstChild(),true);
     document_destination.appendChild(Node);use importNode to copy the Node from the origin document to the destination document ( the true flag means "import the Node and all subnodes"). Once you have the Node in the destination document, you must append it somewhere in the hierarchy (in the example, it will be a child of the root Node)
hope it helps!

Similar Messages

  • Is there a way to add an existing distribution list to a document?

    i created a distribution list with CVI1 and i am trying to add it to a document, NOT via the distribution list but from the document itself.
    via the "environment" menu, I can create a new list or change a list in which the document is already written in: but i cannot add an existing list from the document.
    any idea?

    i am aware  of that: that i why i asked this question. i need to upload distribution lists to be added to documents and i did not find a way to add the documents to the list (cvi2) in a recording: the amount of document i can add is limited to the amount of lines i see on the screen;
    my final goal is to add existing lists to documents or documents to lists, via upload (excel sheet or txt file) LSMW or other methods!
    any idea is welcome: i have searched and not found solutions

  • Can't add an existing signature to a new mail account.

    My iCloud account has Signature #1.  When I add a new IMAP account, I can not select Signature #1 for it. The Choose Signature selection menu on the Signatures screen has a greyed-out "none" in it.  If I select All Signatures and create Signature #2, that signature is not visible to the iCloud account and the IMAP account can't see either of them.

    did it yesterday :-)
    what I did was...
            Node tmpNode = document_destination.importNode(document_source.getFirstChild(),true);
         document_destination.appendChild(Node);use importNode to copy the Node from the origin document to the destination document ( the true flag means "import the Node and all subnodes"). Once you have the Node in the destination document, you must append it somewhere in the hierarchy (in the example, it will be a child of the root Node)
    hope it helps!

  • How to add an existing content database to new Site collection

    Hi All,
    Can anyone help to figure out how can I add existing content database to a new site collection in SharePoint 2013 foundation.
    We have more than 40 site collections under one web application, and only one site collection is returning 404 error. When checked in the central admin to view all site collections, the details on the right side of the site is not visible, and unable
    to delete it. The database is not corrupt, as I tried to add the same content database to a new web application, and it works perfectly in a new web app.
    As we couldn't find any solution, the only option we thought of was to blow the site collection and create a new one and add the exisiting database, but I am unaware as to how can I add existing database to new create site collection. Can anyone help
    me with this please?
    Regards,
    DJ

    It's working....
    The current database was corrupt I guess, (not sure though). Took old backup file and tested to see if it's working. After the test was successful...
    Removed the current database in CA
    Delete the current database in SQL server
    Restored the working backup file in SQL server
    Added the content db in CA
    That's it... the site collection is working now...
    Regards,
    DJ

  • How can I transfer elements from an old document to a new one?

    Hi everybody,
    I'm quite new to InDesign and not really from this area, so I'm having a tough time learning how to use it. My first project is what I first thought would be simple for a start: a recipe book. So I started using different master pages for different categories - meat, fish, soups, etc. - and had my first problem when finding out it is not a good idea to have text frames in the master page, cause everytime I change something there and apply it to the others, it kind of messes up the existing pages and I get lots of duplicated frames. it got so messed up I figured the best thing would be to start a completely new document (I also found out I had the wrong margins and can use a normal A4 with bleed, and no bigger-sized page, as I'd done).
    Now I decided to start the whole thing over again, but I don't want to start from zero. So how can I:
    1) import my existing gradients?
    2) import my character styles and colors?
    3) import my texts? (I guess this is not very difficult, so I figure I can find out, but please tell me if there are any "tricks", cause I'm thinking of exporting my doc as txt and copy-pasting.)
    I'm sorry if this has already been posted in this forum or can be found in the help-section, but I swear I have looked for it and couldn't find it...
    Thanks already in advance!

    easiest are steps 1) and 2) :)
    make copy of your document, add new blank page on the end, select all pages without last - click delete icon :)
    next - delete all MasterPages
    next - redefine page size, margins, add MasterPages, etc.
    now - you can copy&paste your texts from old document :)
    robin
    www.adobescripts.com

  • Creating a new document/canvas (to add multiple images to)

    I am totally new to Photoshop Elements (using v.13), with some previous experience in old versions of Photoshop. I am an interior designer and I want to make a design board. Essentially what I am trying to do is create a new, blank document layer and then add images of furniture, rugs, etc. Each element needs to be its own layer so that I can edit each individually. I have no idea how to even begin that on here. New document? Open a blank document? When I go to the layers tab, creating layers is not even an option. Obviously, I need some help. Explain this to me as you would to a child....Thanks!

    jennb21985 wrote:
    Each element needs to be its own layer so that I can edit each individually.
    Open the Editor in Expert tab
    Go to File menu>new>blank file. Enter the dimensions, resolution in px/in, and background. This  "canvas" will be the background layer and will show up as such in the layers palette.
    Now, as far as adding pictures of furniture, rugs, etc., I suggest that you prepare each one so that they are ready to be placed on the canvas. Do the math: how large can each one be? Are they all in portrait or landscape orientation? If not, what will be the best fit? Is the brightness/contrast of each picture more-or-less uniform so that the design board will look nice.
    Crop each picture to specification, and save it to disk.
    Once you have done this, do the following:
    Open the blank file
    Open Picture A, go to Select menu>all, then Edit menu>Copy to place it on the clipboard,
    Go back the blank file, then Edit>Paste. Picture A will be on its own layer. Position it with the move tool, and resize with the corner handles, if needed.
    Do the same with pictures B, C, D, etc.
    As indicated above, in the dialog for the blank file, you need to enter a value for resolution. Ideally, the resolution should be the same as that of the picture files. You can check via Image menu>resize>image size. If the resolution is 72 px/in, enter this in the field for the blank file.
    Feel free to repost if this is not clear.

  • Unable to add books - "the document that you are attempting to add already exists in the library" - there is NOTHING in the liabrary. Any suggestions??

    I  just downloaded Digital Editions so I can read proceedings from a conference. I followed the instructions but cannot add the
    proceedings to ADE. The error message reads "Unable to add document xxx.epub. The document that you are attempting to
    add already exists in the library" There is nothing in the library, can't add the "Getting started" . e-book - same message. I did
    delete ADE and re-downloaded it. Is there anything else I can do? Any help would be appreciated. Thanks

    Get a new SIM from AT&T. They will replace it for free.

  • Add new document link not working in upgraded sharepoint 2013?

    Hello there,
    Upgraded SharePoint team sites from 2010 to 2013. add new document link not working for shared document in upgraded sharepoint 2013?. it is specially not working on machine where Office web apps set up with this sharePoint server and it
    is working fine with environment  Office web apps not configured with Sharepoint.
    Looking resoluion /suggestion, thanks in advance.
    Regards,
    Sushil

    Hi  Sushil,
    According to your description, my understanding is that the add new document link was not working on machine where Office web apps set up with this SharePoint server after you upgraded SharePoint team sites
    from 2010 to 2013.
    For your issue, it can be caused by integrating Office Web Apps with upgraded SharePoint Site.
    Firstly please make sure claims-based authentication is used by the SharePoint web application that is used to create the new document. Only web applications that use claims-based authentication can open
    files in Office Web Apps. To determine the authentication provider for a web application, follow these steps:
    1.In SharePoint 2013 Central Administration, click Manage web applications.
    2.Select the web application that you want to check, and click Authentication Providers on the ribbon.
    The authentication provider must be displayed as Claims Based Authentication for Office Web Apps to work correctly with the web application. To resolve this issue, you can delete the web application and recreate
    it using claims-based authentication, or you can change the authentication method of the web application.
    Secondly, make sure the WOPI zones match on the SharePoint 2013 and the Office Web Apps Server farm.
    To do this, run the following command on the SharePoint Server:
    Get-SPWopiZone
    The result will be one of the following:.
    internal-https
    internal-http
    external-https
    external-http
    Next, run the following command on the SharePoint Server.
    Get-SPWOPIBinding
    In the output, look for WopiZone: zone. If the results from Get-SPWopiZone don’t match the zone that is returned by Get-SPWOPIBinding, run the Set-SPWOPIZone -Zone cmdlet on the SharePoint Server to change
    the WOPI zone to match the result from Get-SPWOPIBinding.
    If not work, you can try to disconnect SharePoint 2013 from Office Web Apps Server and re-configure Office Web Apps for SharePoint 2013.
    For more information, please refer to the article:
    http://technet.microsoft.com/en-us/library/ff431687(v=office.15).aspx
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Can I create a new document with a locked PDF file, add new pages, and lock it all again?

    I published a PDF document ten years ago and now want to add Creative Commons licensing language to the copyright page.  But I forgot the password!  I gather from the Forum that there is no way to recover the password.  However, I wonder if I can take the locked PDF file, create a new document (adding a new page for the licensing information), then lock the whole thing up again.  Will this work?  Thanks for your help!                                                                               

    To create an unprotected file you would need the password.

  • When i open a new document, my "width" and "lenght" add two zeros automatically to file size??? For example basic A4 size in mm is 210 00mm x 297 00mm? And i can´t do nothing about it! Why on earth?

    When i open a new document, my "width" and "lenght" add two zeros automatically to file size??? For example basic A4 size in mm is 210 00mm x 297 00mm? And i can´t do nothing about it! Why on earth?
    This "error note" must have something to do about it?

    elppaelo,
    You may try the list.
    The following is a general list of things you may try when the issue is not in a specific file (you may have tried/done some of them already); 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    If possible/applicable, you should save curent artwork first, of course.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to 3 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • I cannot updates in my application store because the previous email add still exist even i have already new apple id

    I cannot update in my application store because the previous email add still exist even i have a new apple id

    FAQ apple id http://support.apple.com/kb/he37
    Doesn't matter if you have a new ID, all apps are tied to the apple id that was used to download it.

  • Trouble keeping photo size when dragging and dropping photo into new document on elements 12

    When trying to place an image into a new document in photoshop elements 12, I select all-copy-paste the image (or even drag it) over to the new doc created.  However, when I do this - the image does not paste in at the same size.  It typically shrinks down in size.   Do I have to save the file, close out and then open the new doc and PLACE it in the document in order for it to keep size?  There must be a better way to do this.  Basically, how can I drag a photo that is 4x6 over to a new doc while keeping the size at 4x6.  Any help would be much appreciated.

    Whenever you combine two images, the resolution (ppi) of the bottom image is the resolution for everything. So if you take an image that is, say, 72 ppi, and paste that into an image at 300 ppi, the pasted object will shrink a lot. If you paste a high-res image into a low res image, the pasted object will enlarge a lot. The best way to get consistent results is to make sure that both images are at the same resolution (image>resize>image size) before you start.

  • Cannot now edit existing or new documents

    Hi, I've been using iWork - Keynote and Pages in particular and have this simple problem. I have been working on a text doc in Pages which has simple Outline formatting. I opened recently to find I cannot edit it in anyway. This is now also with new documents from the templates. I can copy, CUT and paste into a new doc but cannot select and delete text. This is also the case with other document I've opened and tried to edit. I've checked the user/permissions for the doc and change all to read/write even thought it was set to read/write for me. I haven't yet tried re-installing because I felt it was quite a simple problem although completely debiliatating!
    Any help would be greatly appreciated.
    Thanks

    There is no authorisation involved. Apple just trusts you to do the right thing.
    It won't have gone back to being demo if you have been running this for years, unless you have done something else you have not told us about.
    Have you changed Macs, upgraded OSX and only used migration assist to transfer iWork?
    You may need to clean off your existing installation:
    http://www.freeforum101.com/iworktipsntrick/viewtopic.php?t=105&mforum=iworktips ntrick
    and do a reinstall from the DVD.
    Peter

  • How do you add existing plugins to a new Photoshop cc installation?

    How do you add existing plugins to a new Photoshop cc installation?

    If it's CC or CC 2014, you check with your plugin makers and download their latest installer. Never attempt to move plugins from an old to a new install.
    Gene

  • Add new document in approval prodedure document tab

    Hi Friends
    I want to add new document like journal enteries in the Documents tab of approval procedures can i do this. Need solution asap.

    Hi Richa Malik
    As you know approvals is internal SBO mechanism and you can't change its behaviour at metadata level.
    What i could suggest is to implement your own approvals for journal entries by yourself usin SDK.
    How it can be done:
    - add UDF to JE - that will store the status of JE (confirmed/redused)
    - implement using UI trigger on Add-action
    - refuse Add action in case of any specific condition and save JE as Journal Voucher + send message to user which has to confirm JE
    - implement some logic regarding UDF of JE (user1 and user 2 can confirm it, others can't, for example)
    - user can save Voucher as JE only if it is confirmed
    something like this..
    HTH

Maybe you are looking for

  • DML/DDL/Forms

    1.Can any one write a select statement to generate sequencial number ? 2.How to print the duplicate records from a table ? 3.What is the difference between a WHERE Clause and HAVING Clause? 4.What is the difference between Key-Next Trigger and When-V

  • IPhone Photo library photos to iPhoto

    my new MBP crashed after about 6 months and i have several pictures on my iphone that were synced from iPhoto. how do i get those pictures onto my new computer?

  • How to track a transaction

    Hi all,      We are attempting to replicate a data base using streams technology. We have the capture, propogate and the apply processes in place. We were also able to replicate a few records. But then this behaviour is not consistent. We would like

  • Does not play dvd's

    I can not play DVD's on my mac mini.

  • Time Capsule and XBSlink

    I've set up XBSlink(http://www.secudb.de/~seuffert/xbslink/about) on both my MM and MBP. It's a system like Xbox Live, allowing you to join/host Xbox games. You do have to do some port mapping, which I've done properly(see images). I'm able to connec