public String findRessourceXML(String nom, Chilkat.Xml xml) { xml.FirstChild2(); while (xml != null) { // FindNextRecord *will* return the current record if it // matches the criteria. xml = xml.FindNextRecord("nom", nom + "*"); if (xml != null) { // Add the company name to the listbox. String id = null; id = xml.GetChildContent("id"); return id; } } return null; }
public void FillTree(TreeNodeCollection treeNodes, Chilkat.Xml xml) { foreach (TreeNode tree in treeNodes) { tree.Remove(); } // Navigate to the first xml record. xml.FirstChild2(); while (xml != null && xml.GetChildContent("nom") != "") { treeNodes.Add(new TreeNode(xml.GetChildContent("nom"))); xml = xml.NextSibling(); } }