C# XPathDocument parsing string to XML with BOM
问题 For a code in C#, I am parsing a string to XML using XPathDocument . The string is retrieved from SDL Trados Studio and it depends on the XML that is being worked on (how it was originally created and loaded for translations) the string sometimes has a BOM sometimes not. Edit: The 'xml' is actually parsed from the segments of the source and target text and the structure element. The textual elements are escaped for xml and the markup and text is joined in one string . So if the markup has BOM