read-xml ( stream -- xml )
Furnace framework > XML parser > Reading XML
Next:read-xml-chunk ( stream -- seq )


Vocabulary
xml

Inputs and outputs
streaman input stream
xmla xml


Word description
Exhausts the given stream, reading an XML document from it. A binary stream, one without encoding, should be used as input, and the encoding is automatically detected.

See also
string>xml, file>xml, bytes>xml

Definition
USING: combinators io kernel xml.autoencoding xml.private
xml.state ;

IN: xml

: read-xml ( stream -- xml )
dup stream-element-type {
{ +character+ [ [ check ] make-xml ] }
{
+byte+
[ [ start-document [ process ] when* ] make-xml ]
}
} case ;