| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|---|
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
|---|
| 3 | <head> |
|---|
| 4 | <title>XML Bug TC</title> |
|---|
| 5 | <script type="text/javascript"> |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | function CreateXmlObject() |
|---|
| 9 | { |
|---|
| 10 | var doc = ( new DOMParser() ).parseFromString( '<tmp></tmp>', 'text/xml' ) ; |
|---|
| 11 | doc.removeChild( doc.firstChild ) ; |
|---|
| 12 | return doc ; |
|---|
| 13 | } |
|---|
| 14 | |
|---|
| 15 | function RunTest() |
|---|
| 16 | { |
|---|
| 17 | var XML = CreateXmlObject() |
|---|
| 18 | // Add a root element that holds all child nodes. |
|---|
| 19 | var MainNode = XML.appendChild( XML.createElement( 'xhtml' ) ) ; |
|---|
| 20 | |
|---|
| 21 | MainNode.appendChild( XML.createTextNode( "<<GetText(Edit)>>" ) ) ; |
|---|
| 22 | |
|---|
| 23 | return ( new XMLSerializer() ).serializeToString( MainNode.firstChild ) |
|---|
| 24 | } |
|---|
| 25 | |
|---|
| 26 | |
|---|
| 27 | window.onload = function() {document.getElementById("output").value = RunTest() } |
|---|
| 28 | </script> |
|---|
| 29 | </head> |
|---|
| 30 | <body> |
|---|
| 31 | <p>Note, this page won't work in IE. You need javascript enabled.</p> |
|---|
| 32 | <p>Expected: &lt;&lt;GetText(Edit)&gt;&gt;</p> |
|---|
| 33 | <p>Output: <input id="output" style="width:20em"></p> |
|---|
| 34 | </body> |
|---|
| 35 | </html> |
|---|