Problem with appendChild - InfoPath Dev
in

InfoPath Dev

Problem with appendChild

Last post 12-11-2007 09:59 AM by Greg Collins. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 12-06-2007 01:34 AM

    Problem with appendChild

    Hello,

    I try to append a part of an xml tree of a secondary data source in my main data source in vbscript.

    But i have an error message because the name space of the secondary data source is different.

    How to use appendChild in the case ?

    Thank you for your response and sorry for my english 

     

     

     

     

  • 12-06-2007 04:31 PM In reply to

    Re: Problem with appendChild

    Your problem most likely stems from different namespace definitions between the two XML documents.

    For example, you might have <my:Root><my:Field/></my:Root> in two different documents, but the my: namespace might have a different definition in each

    Doc1: xmlns:my="definition1"
    Doc2: xmlns:my="some_other_definition"

    This means that the two are incompatible and you cannot simply append XML from one to the other.

    I don't know of a mechanism for redefining a namespace definition that would allow for you to then just append like you want. If someone does know of a way, I'd like to hear about it.

    The method I've used in the past is to manually create XML for the second document, feeding in the values (requires code), and then appending.

  • 12-07-2007 12:03 AM In reply to

    Re: Problem with appendChild

    Thank you,

    This is exactly the problem, but i can't feed individual values because the tree contain many values. Is it possible to globally "import" a part of the secondary datasource into the main ?

     

     

     

  • 12-07-2007 09:30 AM In reply to

    Re: Problem with appendChild

    You can write an XSL to convert the XML from the original format to the new format. Then you can append the new XML genereated by the XSL.

  • 12-10-2007 04:49 AM In reply to

    Re: Problem with appendChild

     I've found importNodeNode function. I'll try to use it.

  • 12-11-2007 09:59 AM In reply to

    Re: Problem with appendChild

    Reading over the help paragraph describing importNode, I'm not sure this will do what you are expecting it to do. However, let me know whether you have success with this.

    Thanks!

Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.