none
converting xml doc to dataset RRS feed

  • Question

  • When i try to convert xml document(which is an output from infopath) to dataset(using custom fields psi (i.e) 

    customfield.

     

    CustomFieldDataSet customFieldDS1 = new customfield.CustomFieldDataSet())

    customFieldDS1.ReadXml(

     

    new XmlNodeReader(xml));(here xml is the xml doc from infopath)

    i am not able to see the values in the dataset .

    can anyone help me?

    Monday, December 20, 2010 7:37 AM

Answers

  • The XML data must have the same schema as the CustomFieldDataSet. Try reading a custom field into a CustomFieldDataSet, and then use WriteXml to write out the XML to a file, to see the schema (or use the WriteXmlSchema method). For a code example, see the ReadCustomFieldsByMdPropUids2 method in the SDK.

    Also, you'd probably want to use the ReadXml method on the DataTable to import one or more rows of data into a CustomFieldsDataTable within the CustomFieldDataSet.

    --Jim


    Jim Corbin [MSFT]
    Monday, December 20, 2010 10:13 PM