In Nushell almost everything is a data structure.
This mind set is also applied to XML structures in Nushell.
A XML tag can be described as a record with the attributes tag, attributes and content.
The tag attribute has a string value that is the tag name.
Attributes are defined with a record structure.
The key is the attribute name and the value is the attribute value.
Finally the content attribute is a list containing a string value for text content or new record structures for nested XML tags.
With this basic record structure you can describe XML content.
To actually transform it to a XML string value you can use the command to xml.
This command will use the data in the record structure and will output XML.