toString(xslPath,
xslParams=None,
xslBasePath=None,
rootTagName='pyxslt',
encoding='ASCII',
prettyPrintXml=False,
**elements)
Serialize a dictionary of Python objects to an XML document,
transform that document using an XSL template, then return the textual
version of the document.
-
- Parameters:
xslPath -
The path to the XSL file that should be used to transform the
serialized Python objects.
(type=str containing the path to an XSL
stylesheet.)
xslParams -
Parameters to pass to the XSL stylesheet.
(type=dict )
xslBasePath -
The path to prepend to absolute stylesheet references.
(type=str )
rootTagName -
The name of the XML tag that will enclose the serialized
Python objects.
(type=str )
encoding -
The character encoding to use when outputting the final XML
document. Values such as UTF-8 ,
ISO-8859-1 , ASCII , etc. are
appropriate.
(type=str )
prettyPrintXml -
True to indent the final XML output,
False to return the bare XML without any extraneous
spaces or linefeeds.
(type=bool )
- Returns:
-
The given Python objects as a transformed XML document.
(type=str )
|