I have a simple CAML query like
<Where><Eq><Field="FieldName"><Value Type="Text">Value text</Value></Field></Eq></Where>
And I have a variable to substitute for "Value text". What's the best way to validate/escape the text that is substituted here in the .NET framework? I've done a quick web search on this problem but all what I found was System.Xml.Convert class but this seems to be not quite what I need here.
I know I could have gone with an XmlWriter here, but it seems like a lot of code for such a simple task where I just need to make sure that the "Value text" part is formatted well.