Careful not to return namespaces as attrs.
Accept an external-format argument for files.