Micro Focus QTP (UFT) Forums
Delete and Replace nodes using vbscript in XML file - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Delete and Replace nodes using vbscript in XML file (/Thread-Delete-and-Replace-nodes-using-vbscript-in-XML-file)



Delete and Replace nodes using vbscript in XML file - SweetyChowdhury - 04-18-2013

Hi Team,

I have a XML file as below :

Code:
<?xml version="1.0" encoding="111"?>

<Fileheaderproperty>
<type>
<Car>2</Car>
<parking>no</parking>
<rent>560</rent>
</type>
<type>
<Car>3</Car>
<parking>no</parking>
<rent>750</rent>
</type>

<type>
<Car>4</Car>
<parking>Yes</parking>
<rent>600</rent>
</type>

<type>
<Car>5</Car>
<parking>no</parking>
<rent>260</rent>
</type>
<Fileheaderproperty>
Now I want to delete the node where the car parking is "Yes" and save it as a new XML file.
Can you please suggest anything on the same.