Thanks Deepak.

On Sat, Apr 14, 2012 at 8:55 PM, Deepak Kumar Mahapatro <
[email protected]> wrote:

> sorry, i forget to remove the msgbox statements. just ignore those.
>
>
> On Sat, Apr 14, 2012 at 8:54 PM, Deepak Kumar Mahapatro <
> [email protected]> wrote:
>
>> Set oXML=XMLUtil.CreateXMLFromFile(<XMLFile Path>)
>> Set oRoot=oXML.GetRootElement
>> While oRoot.ChildElements.Count>0
>>  oRoot.RemoveChildElement(oRoot.ChildElements.Item(1))
>> Wend
>> Set oRoot=Nothing
>> oXML.SaveFile(<XMLFile Path>)
>> Set oXML=Nothing
>>
>>
>> OR
>>
>>
>> Set oXML=CreateObject("MSXML2.DOMDocument.6.0")
>> oXML.load <XMLFile Path>
>> Set oRoot=oXML.lastChild
>> MsgBox oRoot.childNodes.length
>> While oRoot.childNodes.length>0
>> oRoot.removeChild(oRoot.childNodes.item(0))
>>  MsgBox oRoot.childNodes.length
>> Wend
>> Set oRoot=Nothing
>> oXML.save <XMLFile Path>
>> Set oXML=Nothing
>>
>>
>> On Sat, Apr 14, 2012 at 3:28 PM, omkar <[email protected]> wrote:
>>
>>> Hi Guys,
>>>
>>> How to remove/delete all the elements from a given node.
>>>
>>> INPUT :
>>> <store>
>>> <book>abc</book>
>>> <book>def</book>
>>> <book>ghi</book>
>>> </store>
>>>
>>> OUTPUT :
>>>
>>> <store></store>
>>>
>>> Please Help me. it's Urgent
>>>
>>> Thanks in advance.
>>>
>>>
>>>
>>> --
>>> Thanks & Regards,
>>> Omkar Deekonda
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> "QTP - HP Quick Test Professional - Automated Software Testing"
>>> group.
>>> To post to this group, send email to [email protected]
>>> To unsubscribe from this group, send email to
>>> [email protected]
>>> For more options, visit this group at
>>> http://groups.google.com/group/MercuryQTP?hl=en
>>>
>>
>>
>>
>> --
>> Regards,
>> Deepak
>>
>
>
>
> --
> Regards,
> Deepak
>
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>



-- 
Thanks & Regards,
Omkar Deekonda
+91 9986519903

-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Reply via email to