-1

I'm trying to add the xml-stylesheet tag in front of an existing XML file using python.

Eg. I'm trying to add

<?xml-stylesheet type="text/xsl" href="audit_stylesheet.xsl" ?>

to the beginning of my XML file.

Miles Law
  • 71
  • 1
  • 10

1 Answers1

1

If you change your line to

"<?xml-stylesheet type=\"text/xsl\" href=\"audit_stylesheet.xsl\" ?>"

and use this https://stackoverflow.com/a/5917395/4843078 you should be good to go

Community
  • 1
  • 1
russOnXMaps
  • 159
  • 1
  • 10