The rest of the predicates deal with reading/writing a DOM
model. The predicate node_load/4 can be used to load a DOM model
from a stream. The loading requires an already existing DOM node,
which is then overwritten. The predicate node_store/4 can be used
to store a DOM model to a stream.
The following serialize predicates are provided:
- text_escape(T, E):
- If T is a variable then the predicate succeeds when T unifies
with the text un-escape of E. Otherwise the predicate succeeds
when E unifies with the text escape of T.
- node_read(S, N):
- node_read(S, N, O):
- The predicate succeeds in loading the stream S into the DOM
node D with the DOM options O. The following DOM options are
root(M): M is the root mask.
type(E,T): T is the complex type for the element E.
format(F): F is the format.
comment(C): C Is the writing comment.
- The root mask can take the values "tree", "table", "document"
and "fragment". The de-fault value is "table". The complex type
can take the values "none", "empty" and "any". The format can
take the values "xml" and "json". The default value is "json".
- node_write(S, N):
- node_write(S, N, O):
- The predicate succeeds in storing the DOM node D into the
stream S with comment C and the DOM options O.
- node_term(N, T):
- If N is a variable then the predicate succeeds when N unifies
with the DOM of T. Otherwise the predicate succeeds when T
unifies with the term N.