G
glbdev
I am trying to select a node in an XML file for deletion. I am using
the following code to select the node:
set node = XmlDoc.selectSingleNode("/dataroot/MainNode[Value = '" +
sSearchCriteria + "']")
Unfortunately, the string "sSearchCriteria" can contain apostrophes
which causes this error:
Error Type:
msxml3.dll (0x80004005)
Expected token ']' found 'STRING'. /dataroot/MainNode[Value =
'Steve'-->'s Auto Parts'<--]
I've tried the "Replace" function to add double, triple, etc
apostrophes but nothing works.
The data in the XML file is not being created by me, and is being used
in several different apllications, so I cannot change it.
Any suggestions?
the following code to select the node:
set node = XmlDoc.selectSingleNode("/dataroot/MainNode[Value = '" +
sSearchCriteria + "']")
Unfortunately, the string "sSearchCriteria" can contain apostrophes
which causes this error:
Error Type:
msxml3.dll (0x80004005)
Expected token ']' found 'STRING'. /dataroot/MainNode[Value =
'Steve'-->'s Auto Parts'<--]
I've tried the "Replace" function to add double, triple, etc
apostrophes but nothing works.
The data in the XML file is not being created by me, and is being used
in several different apllications, so I cannot change it.
Any suggestions?