Hi All,
I have an Infopath Forms Library. Schema contains around six different sections. All sections contains some fields and an attribute. I have created myschema.cs file for reading infopath forms using following command: XSD.EXE "C:\Documents and Settings\Desktop\Product Concepts\Extracted Files\myschema.xsd" /l:cs /c.
Code for reading a file is:
MasterFile objSchema = new MasterFile();
Byte[] reqData;
//open the file in binary mode
reqData = file.OpenBinary();
//create a memory stream of this binary data
MemoryStream ios = new MemoryStream(reqData);
//now create a xml serializer for data
XmlSerializer ser = new XmlSerializer(typeof(MasterFile));
//deserialize this data into the Product Concept object
objSchema = (MasterFile)ser.Deserialize(ios);
ios.Close();
The code is working fine, when i read fields value (from any section) from infopath form(XML File). But i'm not able to read Attributes. Any IDEA????
Thanks,
Sumit