# Path: xnb_parse/file_formats/xml_utils.py
# def output_xml(xml, filename):
# def output_xml(xml, filename):
# 
# Path: xnb_parse/xna_types/xna_primitive.py
# class Enum(object):
#     __slots__ = ('_value', '_name')
#     enum_values = None
#     xml_tag = None
# 
#     def __init__(self, value):
#         self._value = value
#         self._name = None
#         if value is not None:
#             self._name = self.enum_values[value]
# 
#     @property
#     def value(self):
#         return self._value
# 
#     @property
#     def name(self):
#         return self._name
# 
#     def __str__(self):
#         return self._name
# 
#     def __repr__(self):
#         return '{}({})'.format(self.__class__.__name__, self._value)
# 
#     def xml(self, parent):
#         xml_tag = self.xml_tag if self.xml_tag else self.__class__.__name__
#         root = ET.SubElement(parent, xml_tag)
#         root.text = self._name
#         return root


import sys
from collections import OrderedDict
from xnb_parse.file_formats.xml_utils import ET
from xnb_parse.xna_types.xna_primitive import Enum
        if parent is None:
            root = ET.Element(xml_tag)
        else:
            root = ET.SubElement(parent, xml_tag)
        for cur_value in self:
            if hasattr(cur_value, 'xml'):
                cur_value.xml(root)
            elif attrib is not None:
                cur_tag = ET.SubElement(root, xml_entry)
                cur_tag.set(attrib, conv(cur_value))
            else:
                cur_tag = ET.SubElement(root, xml_entry)
                cur_tag.text = conv(cur_value)
        return root


class XNADict(OrderedDict):
    __slots__ = ()

    def xml(self, parent=None, xml_tag='Dict', xml_entry='Entry', attrib=None):
        if sys.version < '3':
            conv = unicode
        else:
            conv = str
        if parent is None:
            root = ET.Element(xml_tag)
        else:
            root = ET.SubElement(parent, xml_tag)
        for cur_key, cur_value in self.items():
            cur_tag = ET.SubElement(root, xml_entry)

# Path: xnb_parse/file_formats/xml_utils.py
# def output_xml(xml, filename):
# def output_xml(xml, filename):
# 
# Path: xnb_parse/xna_types/xna_primitive.py
# class Enum(object):
#     __slots__ = ('_value', '_name')
#     enum_values = None
#     xml_tag = None
# 
#     def __init__(self, value):
#         self._value = value
#         self._name = None
#         if value is not None:
#             self._name = self.enum_values[value]
# 
#     @property
#     def value(self):
#         return self._value
# 
#     @property
#     def name(self):
#         return self._name
# 
#     def __str__(self):
#         return self._name
# 
#     def __repr__(self):
#         return '{}({})'.format(self.__class__.__name__, self._value)
# 
#     def xml(self, parent):
#         xml_tag = self.xml_tag if self.xml_tag else self.__class__.__name__
#         root = ET.SubElement(parent, xml_tag)
#         root.text = self._name
#         return root


# Path: xnb_parse/xna_types/xna_system.py
import sys
from collections import OrderedDict
from xnb_parse.file_formats.xml_utils import ET
from xnb_parse.xna_types.xna_primitive import Enum

        if parent is None:
            root = ET.Element(xml_tag)
        else:
            root = ET.SubElement(parent, xml_tag)
        for cur_value in self:
            if hasattr(cur_value, 'xml'):
                cur_value.xml(root)
            elif attrib is not None:
                cur_tag = ET.SubElement(root, xml_entry)
                cur_tag.set(attrib, conv(cur_value))
            else:
                cur_tag = ET.SubElement(root, xml_entry)
                cur_tag.text = conv(cur_value)
        return root


class XNADict(OrderedDict):
    __slots__ = ()

    def xml(self, parent=None, xml_tag='Dict', xml_entry='Entry', attrib=None):
        if sys.version < '3':
            conv = unicode
        else:
            conv = str
        if parent is None:
            root = ET.Element(xml_tag)
        else:
            root = ET.SubElement(parent, xml_tag)
        for cur_key, cur_value in self.items():
            cur_tag = ET.SubElement(root, xml_entry)

            if hasattr(cur_key, 'xml') and not isinstance(cur_key, Enum):