On this page
xmlparser
This module parses an XML document and creates its XML tree representation.
Imports
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]; options: set[XmlParseOption] = {reportComments}): XmlNode {...}{. raises: [IOError, OSError, ValueError, Exception], tags: [ReadIOEffect, RootEffect, WriteIOEffect].} - 
    Parses the XML from stream 
sand returns aXmlNode. Every occurred parsing error is added to theerrorssequence. Source Edit - 
    
proc parseXml(s: Stream; options: set[XmlParseOption] = {reportComments}): XmlNode {...}{. raises: [IOError, OSError, ValueError, Exception, XmlError], tags: [ReadIOEffect, RootEffect, WriteIOEffect].} - 
    Parses the XML from stream 
sand returns aXmlNode. All parsing errors are turned into anXmlErrorexception. Source Edit - 
    
proc parseXml(str: string; options: set[XmlParseOption] = {reportComments}): XmlNode {...}{. raises: [IOError, OSError, ValueError, Exception, XmlError], tags: [ReadIOEffect, RootEffect, WriteIOEffect].} - 
    Parses the XML from string 
strand returns aXmlNode. All parsing errors are turned into anXmlErrorexception. Source Edit - 
    
proc loadXml(path: string; errors: var seq[string]; options: set[XmlParseOption] = {reportComments}): XmlNode {...}{. raises: [IOError, OSError, ValueError, Exception], tags: [ReadIOEffect, RootEffect, WriteIOEffect].} - 
    Loads and parses XML from file specified by 
path, and returns aXmlNode. Every occurred parsing error is added to theerrorssequence. Source Edit - 
    
proc loadXml(path: string; options: set[XmlParseOption] = {reportComments}): XmlNode {...}{. raises: [IOError, OSError, ValueError, Exception, XmlError], tags: [ReadIOEffect, RootEffect, WriteIOEffect].} - 
    Loads and parses XML from file specified by 
path, and returns aXmlNode. All parsing errors are turned into anXmlErrorexception. Source Edit 
© 2006–2021 Andreas Rumpf
Licensed under the MIT License.
 https://nim-lang.org/docs/xmlparser.html