summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-03-08 22:45:57 +0100
committerAraq <rumpf_a@web.de>2011-03-08 22:45:57 +0100
commit62b4cc6c02278bd4cac0cb201b360f7330069fe1 (patch)
tree74d4f5db299b535fefd1221c6e0976ee7fd7a908 /lib/pure
parentfa332b729835f70c71ee235626490697779fee87 (diff)
downloadNim-62b4cc6c02278bd4cac0cb201b360f7330069fe1.tar.gz
more fixes for dy(n)lib typo; fixes #15
Diffstat (limited to 'lib/pure')
-rwxr-xr-xlib/pure/xmldom.nim13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/pure/xmldom.nim b/lib/pure/xmldom.nim
index 552bd54cf..bf031fb88 100755
--- a/lib/pure/xmldom.nim
+++ b/lib/pure/xmldom.nim
@@ -45,7 +45,8 @@ const
   DocumentFragmentNode* = 11
 
   # Nodes which are childless - Not sure about AttributeNode
-  childlessObjects = {DocumentNode, AttributeNode, TextNode, CDataSectionNode, ProcessingInstructionNode, CommentNode}
+  childlessObjects = {DocumentNode, AttributeNode, TextNode, 
+    CDataSectionNode, ProcessingInstructionNode, CommentNode}
   # Illegal characters
   illegalChars = {'>', '<', '&', '"'}
 
@@ -73,7 +74,7 @@ type
   Element = object of Node
     FTagName: string # Read-only
   
-  PCharacterData = ref CharacterData
+  PCharacterData* = ref CharacterData
   CharacterData = object of Node
     data*: string
     
@@ -109,10 +110,10 @@ type
 # DOMImplementation
 proc getDOM*(): PDOMImplementation =
   ## Returns a DOMImplementation
-  var DOMImpl: PDOMImplementation
-  new(DOMImpl)
-  DOMImpl.Features = @[(name: "core", version: "2.0"), (name: "core", version: "1.0"), (name: "XML", version: "2.0")]
-  return DOMImpl
+  new(result)
+  result.Features = @[(name: "core", version: "2.0"), 
+                      (name: "core", version: "1.0"), 
+                      (name: "XML", version: "2.0")]
 
 proc createDocument*(dom: PDOMImplementation, namespaceURI: string, qualifiedName: string): PDocument =
   ## Creates an XML Document object of the specified type with its document element.