16
Developer's Corner / C# and XML Problem - any help please?
« on: April 13, 2012, 09:51 PM »
Hi all :tellme:
Someone's let me loose with C#.
I've nearly finished a podcast downloader application, and I'm ironing out several bugs. One of which is that I have some code that is using XmlDocument.SelectSingleNode:
Now, there is a bug when the episode variable has a colon ( : ) in it - I'd guess because it thinks I'm declaring a namespace or something.
Does anyone have a suggestion of how to escape the : character in a string please?
Many thanks!
Someone's let me loose with C#.
I've nearly finished a podcast downloader application, and I'm ironing out several bugs. One of which is that I have some code that is using XmlDocument.SelectSingleNode:
Code: C# [Select]
- XmlNode node = doc.SelectSingleNode("rss/channel/item/title[.=\'" + episode + "\']");
Now, there is a bug when the episode variable has a colon ( : ) in it - I'd guess because it thinks I'm declaring a namespace or something.
Does anyone have a suggestion of how to escape the : character in a string please?
Many thanks!