spss.GetXmlUtf16 Function (Python)

spss.GetXmlUtf16(handle, filespec). Writes the XML for the specified handle (dictionary or output XML) to a file or returns the XML if no filename is specified. When writing and debugging XPath expressions, it is often useful to have a sample file that shows the XML structure. This function is particularly useful for dictionary DOMs, since there are not any alternative methods for writing and viewing the XML structure. (For output XML, the OMS command can also write XML to a file.) You can also use this function to retrieve the XML for a specified handle, enabling you to process it with third-party utilities like XML parsers.

Example

handle = "activedataset"
spss.CreateXPathDictionary(handle)
spss.GetXmlUtf16(handle,'/temp/temp.xml')