std/xml/error
std/xml/src/error.trb
XmlError: what went wrong reading XML - text that is not well-formed, a name that breaks the rules of namespaces, an
entity that is external or recursive, or an expansion past Xml.entityLimit.
type XmlError
type XmlError with Show, Error
Why a text is not an XML document this reader accepts, and where.
Examples
use Xml from "std/xml"
match Xml().parse("<a><b></a>") {
Ok(_) => print "read"
Fail(problem) => print "line {problem.line}, column {problem.column}: {problem.message}"
}
field line
line: Int
The line of the problem, counted from 1, and 0 for a problem of a tree that is written.
field column
column: Int
The column of the problem in its line, counted from 1 in characters.
field message
message: String
What is wrong, without the place.
fn show
fn show(): String
line 3, column 5: message, or the message alone for a problem of a tree that is written: it has no place.