attribute() = #xml_attribute{name = xmlrat:attrname(), value = xmlrat:attrvalue()}
An XML attribute, which is attached to an element, describing some property of that element.
attrname() = xmlname()
The name of an attribute.
attrvalue() = binary() | [binary() | {entity, binary()} | {parameter, binary()}]
The value of an XML attribute.
comment() = #xml_comment{text = binary()}
A comment in an XML document, containing arbitrary character data.
component() = prolog() | element() | comment() | pi() | whitespace()
A top-level component within an XML document.
content() = binary() | {entity, binary()} | {parameter, binary()} | element() | pi() | comment()
Possible types of content within an XML document.
document() = [component()]
An XML document, consisting of components.
element() = #xml_element{tag = xmlrat:tag(), attributes = [xmlrat:attribute() | xmlrat:namespace() | xmlrat:whitespace()], content = [xmlrat:content()]}
An XML element, which has a tag, attributes, and content.
extid() = {system, uri()} | {public, pubid(), uri()}
namespace() = #xml_namespace{name = default | xmlrat:nsname(), uri = xmlrat:uri() | xmlrat:attrvalue()}
An XML namespace (xmlns:*
attribute), describing a namespace
which is available on an element and its children.
nsname() = default | binary()
The name of a namespace. Can be the atom default
to indicate
that no namespace name was given (but a default namespace is in force for
the given scope).
pi() = #xml_pi{target = xmlrat:pitarget(), options = xmlrat:piopts()}
An XML processing instruction.
piopts() = binary() | [attribute()]
The parameters to the PI. If these parsed successfully as if they were XML attributes, then the second form is used. Otherwise, the raw parameters as a binary are given.
pitarget() = binary()
The name of a processing instruction's "target" (the first part, specifying
the kind of PI it is, e.g. <<"xml-stylesheet">>
).
prolog() = xmldecl() | xmlrat_dtd:doctype()
A prolog component, which can appear before the first XML element in a document.
pubid() = binary()
tag() = xmlname()
The tag of an XML element.
tagged_record(T, _Tag) = T
A record type which contains a field named tag
, set to the given XML
tag name. Enables the use of generic records for a set of XML tags with
different names but the same underlying type.
uri() = binary()
A URI, encoded as a UTF-8 binary.
whitespace() = binary()
A binary consisting of whitespace characters ([ \r\n\t]
etc)
xmldecl() = #xml{version = xmlrat:xmlver(), encoding = undefined | xmlrat:encoding(), standalone = undefined | yes | no}
The XML document declaration (<?xml version="1.0"...?>
).
xmlname() = binary() | xmlnsname() | xmlnsuriname()
An XML name (may be for an element or attribute, or other concept). May have namespace information attached.
xmlnsname() = {nsname(), binary()}
An XML name scoped to a namespace, but the namespace has not yet been resolved (e.g. because it isn't defined, but the options given to the parser allow undefined namespaces).
xmlnsuriname() = {nsname(), binary(), uri()}
An XML name scoped to a namespace, fully resolved with the final URI available.
xmlver() = binary()
XML version, must be <<"1.0">>
Generated by EDoc