Problem select a node in my: - InfoPath Dev
in

InfoPath Dev

Problem select a node in my:

Last post 06-01-2006 09:31 AM by gregv. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-01-2006 08:49 AM

    • gregv
    • Not Ranked
    • Joined on 05-24-2006
    • France
    • Posts 14

    Problem select a node in my:

    Another problem for today :(
    My Infopath file is bind to a SQL Server database for sending and reading data. From my 'Custom Task Pane' i can select nodes perfectly using for example :
    node = XDocument.DOM.selectSingleNode("/dfs:myFields/dfs:queryFields/q:sc_devis/@de_cmde_ref");
    But i added to this document some fields wich are not binded to the database (myFileds -> right click -> add) and I try to fill them from the Custom Task Pane. But it doesn't work.

    The fields can be accessed with my:query/@my:cmde_ref
    I tried this in my TaskPane code :
    node = XDocument.DOM.selectSingleNode("/my:myFields/my:query/@my:cmde_ref");
    but without success, node is always null.

    I precise that in the load event of the taskpane i put this line to access the namespaces :
    XDocument.DOM.setProperty("SelectionNamespaces", 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:q="http://schemas.microsoft.com/office/infopath/2003/ado/queryFields" xmlns:d="http://schemas.microsoft.com/office/infopath/2003/ado/dataFields" xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-05-24T12:32:04"');

    Someone has an idea ?
  • 06-01-2006 09:18 AM In reply to

    Re: Problem select a node in my:

    Is the root node namespace in your XPath supposed to be "my:" or "dfs:"?
  • 06-01-2006 09:31 AM In reply to

    • gregv
    • Not Ranked
    • Joined on 05-24-2006
    • France
    • Posts 14

    Re: Problem select a node in my:

    I first created my document with using sql server so I think it is dfs:
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.