XML processing
#
prefix_hint
| : string | ; | |||
#
tag
| : Xmlm.name | ; | |||
#
attrs
| : AttrMap.t | ; | |||
#
child_nodes
| : element list | ; | |||
#
text_before
| : string | ; | (* | The text node immediately before us | *) |
#
last_text_inside
| : string | ; | (* | The last text node inside us with no following element | *) |
#
source_hint
| : source_hint | ; | (* | Location to report in error messages | *) |
An XML element node (and nearby text).
Generate a string identifying this element for use in error messages. Includes the source location, if known.
raise_elem "Problem with" elem
raises a Safe_exception
with the message "Problem with <element> at ..."
Like raise_elem
, but writing a log record rather than raising an exception.
Returns the text content of this element.
Safe_exception
if it contains any child nodes.
Get the value of the non-namespaced attribute attr
.
Throws an exception if elem
isn't in our namespace.
Safe_exception
if element does not have the expected name and namespace.