W3cubDocs

/Nim

Module xmldomparser

This module parses a XML Document into a XML DOM Document representation.

Imports

xmldom, os, streams, parsexml, strutils

Types

EMismatchedTag = object of ValueError
Raised when a tag is not properly closed
EParserError = object of ValueError
Raised when an unexpected XML Parser event occurs

Procs

proc loadXMLStream(stream: Stream): PDocument {...}{.raises: [Exception,
    EInvalidCharacterErr, EHierarchyRequestErr, EWrongDocumentErr,
    ENoModificationAllowedErr, ENamespaceErr, EMismatchedTag, EInuseAttributeErr,
    EParserError], tags: [ReadIOEffect].}
Loads and parses XML from a stream specified by stream, and returns a PDocument
proc loadXML(xml: string): PDocument {...}{.raises: [Exception, EInvalidCharacterErr,
    EHierarchyRequestErr, EWrongDocumentErr, ENoModificationAllowedErr,
    ENamespaceErr, EMismatchedTag, EInuseAttributeErr, EParserError],
                                   tags: [ReadIOEffect].}
Loads and parses XML from a string specified by xml, and returns a PDocument
proc loadXMLFile(path: string): PDocument {...}{.raises: [IOError, Exception,
    EInvalidCharacterErr, EHierarchyRequestErr, EWrongDocumentErr,
    ENoModificationAllowedErr, ENamespaceErr, EMismatchedTag, EInuseAttributeErr,
    EParserError], tags: [ReadIOEffect].}
Loads and parses XML from a file specified by path, and returns a PDocument

© 2006–2018 Andreas Rumpf
Licensed under the MIT License.
https://nim-lang.org/docs/xmldomparser.html