J
Jason Bailey
Hello,
I'm not sure if this should go to an infopath forum or a VB NET forum?
I'm trying to use Visual Basic .Net to open Infopath generated XML files;
make changes and re-save them as infopath readable XML. As a quick test:
I opened a sample xml file that I'd created with infopath; I also extracted
the infopath XSD file.
I loaded the XML data into a dataset
I changed no data
I created a new xml file based on the dataset and the XSD (infopath
generated) file
I tried:
myXmlDataDocument.DataSet.WriteXml("D:/sss.xml", XmlWriteMode.IgnoreSchema)
myXmlDataDocument.DataSet.WriteXml("D:/ttt.xml", XmlWriteMode.WriteSchema)
Both do indeed produce XML but neither open in Infopath
I found some good sample code at:
http://samples.gotdotnet.com/quickstart/howto/doc/Xml/LoadDataSetXMLData.aspx
(Load xml into a dataset)
and
http://samples.gotdotnet.com/quickstart/howto/doc/Xml/SaveDataSetXML.aspx
(Save a dataset to XML)
I'm not sure how much detail to go into but basically; I'd like to know if
I'm doing anything obviously wrong.
Looking at the new xml (using XmlWriteMode.WriteSchema) file it looks like
it's composed of schema and XML. and some of the complex data is missing.
Could someone point in the right direction of some code that will simply open
an infopath generated xml file, allow changes/edits and then resave to a new
or the same xml file. It seems to lose itself once I save xml from a dataset.
Actually the important thing appears to be that the complex data is missing.
I see now that XmlWriteMode.IgnoreSchema is just missing some instructions
(i.e. to use infopath <?mso-application progid="InfoPath.Document"?>) and
that XmlWriteMode.WriteSchema is both xml and schema in one file.
Is the dataset of visual basic ignoring my complex type xml data? Should I
be doing this in another way?
I have sample code and data.
Thanks for any advice
Jason
I'm not sure if this should go to an infopath forum or a VB NET forum?
I'm trying to use Visual Basic .Net to open Infopath generated XML files;
make changes and re-save them as infopath readable XML. As a quick test:
I opened a sample xml file that I'd created with infopath; I also extracted
the infopath XSD file.
I loaded the XML data into a dataset
I changed no data
I created a new xml file based on the dataset and the XSD (infopath
generated) file
I tried:
myXmlDataDocument.DataSet.WriteXml("D:/sss.xml", XmlWriteMode.IgnoreSchema)
myXmlDataDocument.DataSet.WriteXml("D:/ttt.xml", XmlWriteMode.WriteSchema)
Both do indeed produce XML but neither open in Infopath
I found some good sample code at:
http://samples.gotdotnet.com/quickstart/howto/doc/Xml/LoadDataSetXMLData.aspx
(Load xml into a dataset)
and
http://samples.gotdotnet.com/quickstart/howto/doc/Xml/SaveDataSetXML.aspx
(Save a dataset to XML)
I'm not sure how much detail to go into but basically; I'd like to know if
I'm doing anything obviously wrong.
Looking at the new xml (using XmlWriteMode.WriteSchema) file it looks like
it's composed of schema and XML. and some of the complex data is missing.
Could someone point in the right direction of some code that will simply open
an infopath generated xml file, allow changes/edits and then resave to a new
or the same xml file. It seems to lose itself once I save xml from a dataset.
Actually the important thing appears to be that the complex data is missing.
I see now that XmlWriteMode.IgnoreSchema is just missing some instructions
(i.e. to use infopath <?mso-application progid="InfoPath.Document"?>) and
that XmlWriteMode.WriteSchema is both xml and schema in one file.
Is the dataset of visual basic ignoring my complex type xml data? Should I
be doing this in another way?
I have sample code and data.
Thanks for any advice
Jason