Well Shawn you have really done some difference here. Very nice man!! .
I will give a try tomorrow at and post some feedback.
About what I have asked above about the element uptade according to the attr (similar to id of table), now that Shawn is an XMLDOM expert he had fixed a code that does the task wich can perfectly fit to a new UDF.
Here is the code:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<messages>
<note id="p501">
<to>Jani</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Dont forget me this weekend!</body>
</note>
<note id="p502">
<to>Jani</to>
<from>Tove</from>
<heading>How are you</heading>
<body>Gimme a call Tovy!!</body>
</note>
<note id="p503">
<to>Shawn</to>
<from>Joser</from>
<heading>Shawn you.....</heading>
<body>.....are a wonderfull person</body>
</note>
</messages>
In wich case if I want to update <to> value of id="p501" attr would be something like this. It is rought script wet.
Code:
UpdateFromAttribute('id', 'p501', 'body', 'Dont forget me this weekend!...please')
Code:
Function UpdateFromAttribute($Attr, $AttrValue, $Path, $PathValue)
For Each $note In $xml.documentelement.childnodes
If $note.getattribute($Attr) = $AttrValue
$heading = $note.selectsinglenode($Path)
$heading.text = $PathValue
EndIf
Next
EndFunction