Last post May 30, 2011 07:11 AM by andrewleighton657
May 29, 2011 07:57 PM|andrewleighton657|LINK
hi, hopefully someone can guide me with this, i've been on this for a few hours and cant get it to work...
node = xmlDoc.DocumentElement.SelectSingleNode("playlist[@name='"
& DropDownList3.SelectedItem.Text & "']/item/title['"
& CheckBoxList3.Text & "']")
delected_track.Selected = True
this works fine if neither the dropdownlist or checkboxlist have single
quotes in their text.... but a few do (<title>It's raining</title> for example)... when they do i receive invalid token error, does anyone know how i can escape the single quote???
btw, i've tried removing the single quotes in the code but it still produces
an error, thanks for the help in advance
May 29, 2011 11:19 PM|Shakti Singh Tanwar|LINK
Here is similar kind of post
May 30, 2011 07:11 AM|andrewleighton657|LINK
hi, thanks for the link but unfortunately what they suggest doesnt seem to work either...
however, after a few hours on this and playing around with it i got it working
in case anyone else gets this problem the solution is to remove the outer single quotes and replace them with double
("playlist/item/title['" & CheckBoxList3.Text & "']")
& CheckBoxList3.Text & """]")