How to add <?xml-stylesheet to QDomDocument?

214 Views Asked by At

I've created an xml document with QDomDocument class. Now I want to add a link to a style-sheet. Is it possible with QDomDocument?

I couldn't identify a method for it in the documentation.

1

There are 1 best solutions below

1
On BEST ANSWER

According to the API documentation it looks like document.insertBefore(document.createProcessingInstruction("xml-stylesheet", "type='text/xsl' href='sheet.xsl'"), document.documentElement()) should do.