Relationships between two xml
Posted on 2006-10-27
I'm creating a PDA app.
I'm using xml files as tables of a database.
When I select the CompanyName from a comboBox
I want the options in table2 that are equals to that CompanyName (using a ID to map)
to display in a second comboBox.
Can anyone help me because I have no clue how to do this.
This is how I get the xml in the comboBox :
//Set file names and create file streams
xmlFileName = "\\My Documents\\Company.xml";
xsdFileName = "\\My Documents\\Company.xsd";
FileStream FsXML = new FileStream(xmlFileName,FileMode.Open);
FileStream FsXSD = new FileStream(xsdFileName,FileMode.Open);
XmlTextReader xtrXML = null;
xtrXML = new XmlTextReader(FsXML);
// Get a DataTable to conveniently use for binding.
dt = companyDS.Tables["record"];
//Bind the list box to state abreviations.
comboBox1.DataSource = dt;
comboBox1.DisplayMember = "CompanyName";