Reputation: 14820
I want to create Windows Media Player playlist files with XDocument. Therefore I have to create this declaration:
<?wpl version="1.0"?>
However, the XDeclaration
object doesn't allow to replace "xml" with "wpl". Is there a proper way to handle this?
Upvotes: 1
Views: 321
Reputation: 338178
That's a processing instruction, not an XML declaration.
new XProcessingInstruction("wpl", "version=\"1.0\"")
Your document is still an XML document, so you can additionally include <?xml version="1.0"?>
at the top, but that's optional.
Upvotes: 2