Skip to content

XML

Enola can read Things from XML (any, non-RDF!); see Rosetta.

This “direct” XML support is different from its “RDF XML” support.

The Tika multi-format I/O internally uses this XML support.

Writing Things converted to XML is still TBD.

Mapping

Attributes & Elements

Both XML attributes and elements are converted to Thing properties / RDF statements.

Text

Text content from XML may be directly used as string objects of Things’ property / RDF statements.

If this is not possible, then it is wrapped in https://enola.dev/text properties.

This depends on whether there are other elements.

Namespaces

Namespaces of XML are supported, both default and with prefixes.

If no xmlns is set, the resource’s URI is used as fallback instead.

As XML default namespaces do not apply to attributes, they must use a prefix.

Empty

An XML input consisting only of an empty <root/> like element is considered “empty” (no Things).

An XML input without any bytes is valid, and equally simply gets converted to No Things.