04-25-2013, 02:13 PM
Hi Sweety, for the deletion of xml data i was not able to reply to that post, instead of that iam replying the answer here
The Out put will be Like
Thanks
-Tanya
Code:
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.Async = "False"
xmlDoc.Load("C:\test.xml")
Set colNodes=xmlDoc.selectNodes ("/Fileheaderproperty/type")
For Each objNode in colNodes
If instr(Ucase(objNode.text),"YES") Then
xmlDoc.documentElement.removeChild (objNode)
End If
Next
xmlDoc.Save "C:\test1.xml"
The Out put will be Like
Code:
- <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>5</Car>
<parking>no</parking>
<rent>260</rent>
</type>
</Fileheaderproperty>
Thanks
-Tanya