i want to know how to remove :
<?xml version="1.0" encoding="UTF-8"?>
from a string
data.
I have tried this but it doesn't work
string result = data.Replace("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>", "");
(I am not working with xml , it's just a response to manipulate it without header )
XmlReader
,XElement
orXmlDocument
for processing that, rather than raw string operations? Assuming that this processing directive will literally be present in a document is not very reliable. – Jeroen Mostert Oct 22 '14 at 13:20?>
which is not in your sample data – Tian van Heerden Oct 22 '14 at 13:26