I am back to asp with XML manupulation. Initial file:
<?xml version="1.0" ?>
<root>
<sport/>
</root>
this is my function
Public Function DefinitFunction( x,z)
Dim text
Dim Root
Dim NodeList
text = "<Definition>" ---<x> </x> <z> </z> --</Definition> "
text = text & "<x><![CDATA["&x&"]]> </x>"
text = text & "<z> </z>"
text = text & "</Definition>"
Set Root = objDoc.documentElement
Set NodeList = Root.getElementsByTagName("sport")
NodeList.appendChild text
objDoc.Save strFile
end function
' Private strFile, objDoc are class object
i want to modify the all thing dinamically. So i have a function
DefinitFunction(x,z)
that will concatenate a string and append " <Definition> ---<x> </x> <z> </z> --</Definition> "
in my file right after the Node <sport>
at the end this should be my result:
<?xml version="1.0" ?>
<root>
<sport>
<Definition>
---<x> </x> <z> </z> --
</Definition>
</sport>
</root>
This is not working. Is there any better way of accomplishing this ? thanks for ur help