Helma logo
helma.org » Home > Stories > XML.writeToString()

XML.writeToString()

Stores a HopObject as XML tree in a string.

Syntax
Xml.writeToString(HopObject)

Example
var str = Xml.writeToString(this.get(0));
res.write(str);

<?xml version="1.0"?>
&lt;!-- printed by helma object publisher     -->
<!-- created Fri Jul 12 17:25:24 CEST 2002 -->
<xmlroot xmlns:hop="http://www.helma.org/docs/
guide/features/database">
  <hopobject id="8" name="message" prototype="message" 
created="1026487524440" lastModified="1026487524440">
  <hop:parent idref="0" prototyperef="root"/>
    <title>The Message</title>
    <text>Don't push me 'cause I'm close 
to the edge.</text>
  </hopobject>
</xmlroot>



Page last modified on 2002-07-12 16:17 by robert