Hi,
I using SelectNodes to extract data from an xml file.
Using the code below I can extract the data i.e. the prices for a particular category:
XmlDocument *doc = new XmlDocument();
XmlNodeList *prodNodes;
prodNodes = doc->SelectNodes("/PRODUCTS/FRUIT[CATEGORY= 'Orange' ]/PRICE");
However, when I try using a variable with SelectNodes it does not seem to work, therefore what is the correct syntax to use (C++).
i.e.
String * selectedItem = FoodCategoryLstBox->SelectedItem.ToString();
messageNodes = prodNodes->SelectNodes("/PRODUCTS / FRUIT [CATEGORY = ‘selectedItem' ]/PRICE");
Thanks for your help!