Entry
How do I use the method toXMLString?
How do I use the method toXMLString?
Apr 17th, 2005 01:49
Martin Honnen,
The method toXMLString takes no argument and returns the concatenation
of toXMLString
(http://www.faqts.com/knowledge_base/view.phtml/aid/35506/fid/1784)
called on each XML object in the XMLList where the result for each XML
object is put on a separate line if XML.prettyPrinting is true.
Here are some examples:
var twoElementList = <>
<god>Kibo</god>
<god>Xibo</god>
</>;
alert(twoElementList.toXMLString());
/* shows
'<god>Kibo</god>
<god>Xibo</god>'
*/
XML.prettyPrinting = false;
alert(twoElementList.toXMLString());
// now shows '<god>Kibo</god><god>Xibo</god>'