xml Module

from-html

'sym xml-node

Returns an xml-node representing an HTML string (wrapped in a <document> tag unless a valid HTML document is provided as input).

from-xml

'sym xml-node

Returns an xml-node representing an XML string (element or fragment).

to-xml

xml-node str

Returns a str representing an XML node.

xcdata

'sym dict:xml-cdata

Returns a dict:xml-cdata representing an XML CDATA section.

xcomment

'sym dict:xml-comment

Returns a dict:xml-comment representing an XML comment.

xelement

'sym dict:xml-element

Returns a dict:xml-element representing an XML element (it will be an empty element with no attributes or children).

xentity

'sym dict:xml-entity

Returns a dict:xml-entity representing an XML entity.

xescape

'sym str

Converts any <, >, &, ', and present in 'sym into the corresponding XML entities.

xentity2utf8

dict:xml-entity str

Returns the UTF-8 symbol corresponding to the specified XML entity.

xquery

dict:xml-element 'sym dict:xml-element

Returns an dict:xml-element representing the first element matching CSS the selector 'sym.

xqueryall

dict:xml-element 'sym dict:xml-element

Returns a list of dict:xml-element dictionaries representing all the elements matching CSS the selector 'sym.

xtext

'sym dict:xml-text

Returns a dict:xml-text representing an XML text node.