Hi,
First thing you need to get the values from the secondary data connection in to drop down. For example your secondary xml (list.xml) may contain like
<RootNode>
<Value>
<ID>1</ID>
<ListA>a1</ListA>
<ListB>b1</ListB>
</Value>
<Value>
<ID>2</ID>
<ListA>a2</ListA>
<ListB>b2</ListB>
</Value>
<Value>
<ID>3</ID>
<ListA>a3</ListA>
<ListB>b3</ListB>
</Value>
</RootNode>
And your drop down ID value is ID (in the above xml), display name is ListA.
1. Get this secondary xml in the code.
IXMLDOMDocument2 listDOM = thisXDocument.GetDOM();
2. Use SelectSingleNode and an XPath expression to find the one record that
contains the selected value; use an XPath filter for this.
a. Get the drop down value. i.e., id value
String idValue = thisXDocument.DOM.selectSingleNode("Xpath of drop down").text;
3. Modify the XPath expression to include the node that corresponds to the text of the selected value, and retrieve
String displayName = listDOM. selectSingleNode(string.Format("RootNode/Value[ID = ‘{0}']/ListA", idValue))