This module parses an XML document and creates its XML tree representation.
XmlError = object of ValueError errors*: seq[string] ## All detected parsing errors.
proc parseXml(s: Stream; filename: string; errors: var seq[string]): XmlNode {...}{. raises: [Exception, ValueError], tags: [ReadIOEffect, RootEffect].}
s
and returns a XmlNode
. Every occurred parsing error is added to the errors
sequence. proc parseXml(s: Stream): XmlNode {...}{.raises: [Exception, ValueError, XmlError], tags: [ReadIOEffect, RootEffect].}
s
and returns a XmlNode
. All parsing errors are turned into an XmlError
exception. proc parseXml(str: string): XmlNode {...}{.raises: [Exception, ValueError, XmlError], tags: [ReadIOEffect, RootEffect].}
str
and returns a XmlNode
. All parsing errors are turned into an XmlError
exception. proc loadXml(path: string; errors: var seq[string]): XmlNode {...}{. raises: [IOError, Exception, ValueError], tags: [ReadIOEffect, RootEffect].}
path
, and returns a XmlNode
. Every occurred parsing error is added to the errors
sequence. proc loadXml(path: string): XmlNode {...}{.raises: [IOError, Exception, ValueError, XmlError], tags: [ReadIOEffect, RootEffect].}
path
, and returns a XmlNode
. All parsing errors are turned into an XmlError
exception.
© 2006–2018 Andreas Rumpf
Licensed under the MIT License.
https://nim-lang.org/docs/xmlparser.html