XmlDocument

Discussion in 'ASP .Net' started by itsme, Oct 14, 2003.

  1. itsme

    itsme Guest

    Hello,

    How can one copy an XmlDocument "A" into another
    XmlDocument "B"

    When I say "copy", I mean to replace the XmlDocument "A"
    completely by the XmlDocument "B". I am trying to use
    cloneNode method of the XmlDocument but somehow I am
    getting multiple copies of the same node.

    Does the cloneNode replaces the XmlDocument completely or
    it adds nodes to the existing XmlDocument?

    Can anyone please help me out?

    Thanks in advance.
     
    itsme, Oct 14, 2003
    #1
    1. Advertisements

  2. The problem mainly lies in the fact that nodes are bound to documents and
    namespaces. Simply coping a node does not work. You can try using the
    XmlDocument.ImportNode method.

    "itsme" <> wrote in message
    news:05f501c392a5$c5d4e9b0$...
    > Hello,
    >
    > How can one copy an XmlDocument "A" into another
    > XmlDocument "B"
    >
    > When I say "copy", I mean to replace the XmlDocument "A"
    > completely by the XmlDocument "B". I am trying to use
    > cloneNode method of the XmlDocument but somehow I am
    > getting multiple copies of the same node.
    >
    > Does the cloneNode replaces the XmlDocument completely or
    > it adds nodes to the existing XmlDocument?
    >
    > Can anyone please help me out?
    >
    > Thanks in advance.
     
    Peter Rilling, Oct 15, 2003
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. KathyB
    Replies:
    0
    Views:
    412
    KathyB
    Jul 6, 2003
  2. Shoval Tomer
    Replies:
    0
    Views:
    590
    Shoval Tomer
    Jul 9, 2003
  3. KathyB
    Replies:
    0
    Views:
    465
    KathyB
    Jul 19, 2003
  4. KathyB
    Replies:
    0
    Views:
    505
    KathyB
    Jul 25, 2003
  5. S. Justin Gengo
    Replies:
    2
    Views:
    2,073
    Kathy Burke
    Aug 26, 2003
  6. Guest

    XMLReader or XMLDocument ?

    Guest, Dec 23, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    955
    Michel
    Dec 24, 2003
  7. Dave Brown

    XMLDocument.Load Progess

    Dave Brown, Feb 4, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    1,652
    Tommy
    Feb 4, 2004
  8. martin

    xmldocument &quot; and "

    martin, Mar 6, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    626
    martin
    Mar 7, 2004
Loading...