I have an XML file that already contains a link to an XSLT file.
I am looking to convert this XML file according to the specified conversion rules, so that I can then create a good PDF file.
It looks like I can do the actual conversion through System.Xml.Xsl.XslCompiledTransform, but for this I have to manually bind XSLT before doing the conversion.
Based on what I saw, now I have to manually pull the XSLT link from the XDocument (rough start below):
xmlDocument.Document.Nodes()
.Where(n => n.NodeType == System.Xml.XmlNodeType.ProcessingInstruction)
However, since XSLT is already mentioned in the XML file itself, I assume that I am doing too much work, and there is a more efficient way to apply the conversion.
Is there, or is this what you need to do?
source
share