faqts : Computers : Programming : Languages : JavaScript : XML : E4X (ECMAScript for XML) : XML objects

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

Entry

How do I use the method valueOf?
How do I use the method valueOf?

Apr 12th, 2005 04:55
Martin Honnen,


The method valueOf takes no argument and simply returns the XML object
it is called on.
Here are some examples:
  var god = <god>Kibo</god>;
  alert(typeof god.valueOf()); // shows 'xml'
  alert(typeof god.*[0].valueOf()); // shows 'xml'