Browse Source

fixed Document.toString

Nicolas Cannasse 15 years ago
parent
commit
4ece7c4f9a
1 changed files with 5 additions and 2 deletions
  1. 5 2
      std/neko/NekoXml__.hx

+ 5 - 2
std/neko/NekoXml__.hx

@@ -353,7 +353,10 @@ class NekoXml__ {
 	}
 
 	public function toStringRec(s: StringBuf) {
-		switch (nodeType) {
+		switch( nodeType ) {
+		case Xml.Document:
+			for( x in _children )
+				x.toStringRec(s);
 		case Xml.Element:
 			s.addChar("<".code);
 			s.add(_nodeName);
@@ -372,7 +375,7 @@ class NekoXml__ {
 			}
 			s.addChar(">".code);
 			for( x in _children )
-				x.toStringRec(s);	
+				x.toStringRec(s);
 			s.addChar("<".code);
 			s.addChar("/".code);
 			s.add(_nodeName);