parse

open fun parse(@Nullable xml: String): Xml

Parse a XML string into a tree.

Return

The parsed tree or null if parsing failed or the string was null.

Parameters

xml

The XML string to parse; can be null.


open fun parse(@Nullable stream: InputStream): Xml

Parse a XML stream into a tree.

Return

The parsed tree or null if parsing failed or the stream was null.

Parameters

stream

The XML stream to parse; can be null. Will be closed.