Is there any way to have an XDocument print the xml version when using the ToString method? Have it output something like this:
<?xml version="1.0"?>
<!DOCTYPE ELMResponse [
]>
<Response>
<Error> ...
I have the following:
var xdoc = new XDocument(new XDocumentType("Response", null, null, "
"), ...
which will print this which is fine, but it is missing the "<?xml version" as stated above.
<!DOCTYPE ELMResponse [
]>
<Response>
<Error> ...
I know that you can do this by outputting it manually my self. Just wanted to know if it was possible by using XDocument.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…