JavaScript Programming JavaScript > Code Examples 'XMLDocument' Property 'XMLDocument' Property <html> <head> <title>Happy Codings :-) JavaScript Code Examples</title> </head> <body> <script> function function1(){ alert(myData.XMLDocument.hasChildNodes); } </script> <xml id="myData"> <customer> <name>Your Name</name> <address>Japan</address> <city>Tokyo</city> </customer> </xml> <button onclick="function1();">XML Has Child Nodes</button> </body> </html>