How to use the pyactiveresource.util.to_xml function in pyactiveresource

To help you get started, we’ve selected a few pyactiveresource examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github JetBrains / youtrack-rest-python-library / python / pyactiveresource / activeresource.py View on Github external
def to_xml(self, root=None, header=True, pretty=False, dasherize=True):
        """Convert the object to an xml string.

        Args:
            root: The name of the root element for xml output.
            header: Whether to include the xml header.
            pretty: Whether to "pretty-print" format the output.
            dasherize: Whether to dasherize the xml attribute names.
        Returns:
            An xml string.
        """
        if not root:
            root = self._singular
        return util.to_xml(self.to_dict(), root=root,
                           header=header, pretty=pretty,
                           dasherize=dasherize)