xmlparser

This module parses an XML document and creates its XML tree representation.

Types

XmlError = object of ValueError
  errors*: seq[string]         ## All detected parsing errors.
  
Exception that is raised for invalid XML.   Source Edit

Procs

proc parseXml(s: Stream; filename: string; errors: var seq[string]): XmlNode {...}{.
    raises: [Defect, IOError, OSError, ValueError, Exception],
    tags: [ReadIOEffect, RootEffect, WriteIOEffect].}
Parses the XML from stream s and returns a XmlNode. Every occurred parsing error is added to the errors sequence.   Source Edit
proc parseXml(s: Stream): XmlNode {...}{.raises: [Defect, IOError, OSError, ValueError,
                                        Exception, XmlError],
                                tags: [ReadIOEffect, RootEffect, WriteIOEffect].}
Parses the XML from stream s and returns a XmlNode. All parsing errors are turned into an XmlError exception.   Source Edit
proc parseXml(str: string): XmlNode {...}{.raises: [Defect, IOError, OSError, ValueError,
    Exception, XmlError], tags: [ReadIOEffect, RootEffect, WriteIOEffect].}
Parses the XML from string str and returns a XmlNode. All parsing errors are turned into an XmlError exception.   Source Edit
proc loadXml(path: string; errors: var seq[string]): XmlNode {...}{.
    raises: [IOError, Defect, OSError, ValueError, Exception],
    tags: [ReadIOEffect, RootEffect, WriteIOEffect].}
Loads and parses XML from file specified by path, and returns a XmlNode. Every occurred parsing error is added to the errors sequence.   Source Edit
proc loadXml(path: string): XmlNode {...}{.raises: [IOError, Defect, OSError, ValueError,
    Exception, XmlError], tags: [ReadIOEffect, RootEffect, WriteIOEffect].}
Loads and parses XML from file specified by path, and returns a XmlNode. All parsing errors are turned into an XmlError exception.   Source Edit