comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » modify the attribute value within a tag container
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
modify the attribute value within a tag container [message #73504] Tue, 09 November 2010 12:21
Truong Le is currently offline  Truong Le
Messages: 42
Registered: September 2010
Member
Hi All,

I want to modify the attributes in the element tag container and I
successfully modify
and save them. However, the position of the tag container that I
modified always move
up to the previous line.

For example:

old_file.xml:

<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<name creator="me">
<firstname>jonh</firstname>
</name>

after I go into the old_file and modify the attribute from creator =
'me' to 'you' and
save to a new file, the content of the new file looks like this

new_file.xml:

<?xml version="1.0" encoding="utf-8" standalone="no" ?><name
creator="you">
<firstname>jonh</firstname>
</name>

I want the structure to remain the same as the old_file and just have
the creator
attribute changes from "me" to "you".

this is how I did it.

; Get the xml file
doc = OBJ_NEW('IDLffXMLDOMDocument', FILENAME=old_file.xml)
docElement = doc->GetDocumentElement()

; Get the creator attribute
creatorText = docElement->GetAttributeNode('creator')
creatorText->SetValue, 'you'

; Save the input msdb to a new filepathname
doc->Save, FILENAME = 'new_file.xml'

Any helps is greatly appreciated.

Thanks
[Message index]
 
Read Message
Previous Topic: Re: IDL_IDLBridge limited to 4?
Next Topic: Still missing features in IDL 8

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 03:18:57 PDT 2025

Total time taken to generate the page: 1.32171 seconds