read-xml-chunk ( stream -- seq ) (original) (raw)

Vocabulary
xml

Inputs

stream an input stream

Outputs

seq a sequence of elements

Word description
Rather than parse a document, as read-xml does, this word parses and returns a sequence of XML elements (tags, strings, etc), ie a document fragment. This is useful for pieces of XML which may have more than one main tag. The encoding is not automatically detected, and a stream with an encoding (ie. one which returns strings from read) should be used as input.

See also
read-xml

Definition

USING: xml.data xml.private xml.state ;

IN: xml

: read-xml-chunk ( stream -- seq )
[ check ] 1 read-seq ;