        );
      }
  
-@@ -227,7 +227,7 @@
+@@ -227,7 +275,7 @@
      public function sourceOfNodeWithPCData() {
        $this->assertEquals(
          '<text>A <a href="http://xp-framework.net/">link</a> to click on</text>', 

+     */
+    public function getSource($indent= INDENT_WRAPPED, $encoding= 'iso-8859-1', $inset= '') {
+      $conv= 'iso-8859-1' != $encoding;
+      return $conv
+        ? iconv('iso-8859-1', $encoding, htmlspecialchars($this->content))
+        : htmlspecialchars($this->content)
+      ;
+    }
+    
+    /**

===================================================================
--- ports/classes/net/xp_framework/unittest/xml/NodeTest.class.php	(revision 14454)
+++ ports/classes/net/xp_framework/unittest/xml/NodeTest.class.php	(working copy)
@@ -208,6 +208,54 @@
     }
 
     /**
+     * Tests a node with numbers
+     *
+     */
+    #[@test]
+    public function sourceOfNodeWithZero() {
+      $this->assertEquals(
+        '<number>0</number>', 
+        $this->sourceOf(new Node('number', 0))
+      );
+    }
+
+    /**
+     * Tests a node with numbers
+     *
+     */
+    #[@test]
+    public function sourceOfNodeWithNegativeNumber() {
+      $this->assertEquals(
+        '<number>-1</number>', 
+        $this->sourceOf(new Node('number', -1))
+      );
+    }
+
+    /**
+     * Tests a node with numbers
+     *
+     */
+    #[@test]
+    public function sourceOfNodeWithHugeDoubleNumber() {
+      $this->assertEquals(
+        '<number>214748364821474</number>', 
+        $this->sourceOf(new Node('number', (double)214748364821474))
+      );
+    }
+
+    /**
+     * Tests a node with numbers
+     *
+     */
+    #[@test]
+    public function sourceOfNodeWithHugeNegativeDoubleNumber() {
+      $this->assertEquals(
+        '<number>-214748364821474</number>', 
+        $this->sourceOf(new Node('number', (double)-214748364821474))
+      );
+    }
+
+    /**
      * Tests a node with CDATA content. 
      *
      */
@@ -215,7 +263,7 @@
     public function sourceOfNodeWithCData() {
       $this->assertEquals(
         '<text><![CDATA[Special characters: <>"\'&]]></text>', 
