Hi Agni,
IXMLDOMDocument3 domXML = (IXMLDOMDocument3) thisXDocument.DataObjects[''getPatient''].DOM;
domXML.setProperty(''SelectionNamespaces'', ''xmlns:dfs=\''http://schemas.microsoft.com/office/infopath/2003/dataFormSolution\'' xmlns:s0=\''http://tempuri.org/\'''');
IXMLDOMNode QueryInput = ...