'xml' Example : xml « Object « HTML / CSS

HTML / CSS » Object » xml 
'xml' Example

    
<html>
    <xml id="myOwnData">
        <myData>
            <firstname>Joe</firstname>
            <lastname>Yin</lastname>
            <age>12</age>
        </myData>
    </xml>
    <script>
    if (myOwnData.readyState == "complete")
       window.alert ("The XML document is ready.");

    var oNode = myOwnData.XMLDocument.selectSingleNode("myData/firstname");
    alert(oNode.text);
    </script>
</html>
    
      
      
Related examples in the same category
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.