-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNodeKindExample01.htm
More file actions
executable file
·32 lines (29 loc) · 1004 Bytes
/
Copy pathNodeKindExample01.htm
File metadata and controls
executable file
·32 lines (29 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!DOCTYPE html>
<html>
<head>
<title>Attributes Example</title>
</head>
<body>
<p>This example only works in Firefox 1.5+.</p>
<script type="text/javascript;e4x=1">
XML.ignoreComments = false;
XML.ignoreProcessingInstructions = false;
var employees = <employees>
<?Dont forget the donuts?>
<employee position="Software Engineer">
<name>Nicholas C. Zakas</name>
</employee>
<!-- just added -->
<employee position="Salesperson">
<name>Jim Smith</name>
</employee>
</employees>;
alert(employees.nodeKind());
alert(employees.*[0].nodeKind());
alert(employees.employee[0].@position.nodeKind());
alert(employees.employee[0].nodeKind());
alert(employees.child(2).nodeKind());
alert(employees.employee[0].name.*[0].nodeKind());
</script>
</body>
</html>