The below mentioned code is developed for Working With DotNetFactory Object using QTP
'Creating a DotNetFactory object pointing to a XML File
Set xmlDNFObj = DotNetFactory.CreateInstance("System.Xml.XPath.XPathDocument",, "c:\plant_catalogue.xml")
'Reading the nodes of the XML file into a list object
set xmlDNFNodes = xmlDNFObj.CreateNavigator.select( "/CATALOG/PLANT/COMMON")
'Traversing through the list of objects and displaying the values
Do While xmlDNFNodes.MoveNext
print xmlDNFNodes.current.value
'Creating a DotNetFactory object pointing to a XML File
Set xmlDNFObj = DotNetFactory.CreateInstance("System.Xml.XPath.XPathDocument",, "c:\plant_catalogue.xml")
'Reading the nodes of the XML file into a list object
set xmlDNFNodes = xmlDNFObj.CreateNavigator.select( "/CATALOG/PLANT/COMMON")
'Traversing through the list of objects and displaying the values
Do While xmlDNFNodes.MoveNext
print xmlDNFNodes.current.value
loop
'Destroying the list of DotNetFactory objects
Set xmlDNFObj = Nothing
To download the XML file associated with the above program please
'Destroying the list of DotNetFactory objects
Set xmlDNFObj = Nothing
To download the XML file associated with the above program please
download plant_catalog.xml from W3School