Sorry, that didn't format very well. I hope that this is better.
IXMLDOMNode
NodeUnit=thisXDocument.DOM.selectSingleNode("./ABWOrder/Order/Details/Detail/UnitCode");
IXMLDOMNode NodeProduct
=thisXDocument.DOM.selectSingleNode("./ABWOrder/Order/Details/Detail/BuyerPro
ductCode");
IXMLDOMDocument3 oSecondDoc
=(IXMLDOMDocument3)thisXDocument.DataObjects["GetPermProducts"].DOM;
oSecondDoc.setProperty("SelectionNamespaces","xmlns:s0=\"OPD\"xmlns:dfs=\"
etc. etc.
IXMLDOMNodeList oNodeList =
oSecondDoc.selectNodes("/dfs:myFields/dfs:dataFields/s0:GetPermProductsRespo
nse/s0:GetPermProductsResult/NewDataSet/products");
foreach (IXMLDOMNode oN in oNodeList)
{
if(oN.selectSingleNode("article").nodeTypedValue.ToString() ==
NodeProduct.nodeTypedValue.ToString())
{
NodeUnit.nodeTypedValue =
oN.selectSingleNode("unit_code").nodeTypedValue;
}
}
Franck Dauché - 22 Nov 2005 19:31 GMT
Hi Paul,
when you select your nodes from your main DOM, you need to point to:
IXMLDOMNode oNode =
thisXDocument.DOM.selectSingleNode("/my:myFields/my:group1/my:group2[n]");
where n if the instance and in your case, group1 = Details and group2
(repeating) = Detail. You can increment n by 1 in your foreach.
Hope that it helps.
Regards,
Franck Dauché
> Sorry, that didn't format very well. I hope that this is better.
>
[quoted text clipped - 26 lines]
>
> }