diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-08-13 11:41:33 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-08-13 11:41:33 +0200 |
commit | dae5450947e93e2e5222ae2710874186bf27bf39 (patch) | |
tree | ddb9da438bb516d81491af41ef646abf34d67406 /lib/pure/xmldomparser.nim | |
parent | 32afc1a562579d38e82ebb385186767dfb1bc3c8 (diff) | |
download | Nim-dae5450947e93e2e5222ae2710874186bf27bf39.tar.gz |
WIP: disallow 'nil' for strings and seqs
Diffstat (limited to 'lib/pure/xmldomparser.nim')
-rw-r--r-- | lib/pure/xmldomparser.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/xmldomparser.nim b/lib/pure/xmldomparser.nim index 7c7f7b99c..8d995102e 100644 --- a/lib/pure/xmldomparser.nim +++ b/lib/pure/xmldomparser.nim @@ -119,7 +119,7 @@ proc loadXMLStream*(stream: Stream): PDocument = ## a ``PDocument`` var x: XmlParser - open(x, stream, nil, {reportComments}) + open(x, stream, "", {reportComments}) var xmlDoc: PDocument var dom: PDOMImplementation = getDOM() @@ -161,7 +161,7 @@ when not defined(testing) and isMainModule: #echo(xml.getElementsByTagName("bla:test")[0].namespaceURI) #echo(xml.getElementsByTagName("test")[0].namespaceURI) for i in items(xml.getElementsByTagName("*")): - if i.namespaceURI != nil: + if i.namespaceURI.len > 0: echo(i.nodeName, "=", i.namespaceURI) |