Back to index

php5  5.3.10
Functions | Variables
dom_test.inc File Reference

Go to the source code of this file.

Functions

 print_node ($node)
 print_node_list ($nodelist)

Variables

PHP $xmlstr

Function Documentation

print_node ( node)

Definition at line 23 of file dom_test.inc.

{
  print "Node Name: " . $node->nodeName;
  print "\nNode Type: " . $node->nodeType;
  if ($node->nodeType != 3) {
      $child_count = $node->childNodes->length;
  } else {
      $child_count = 0;
  }
  print "\nNum Children: " . $child_count;
  if($child_count <= 1){
    print "\nNode Content: " . $node->nodeValue;
  }
  print "\n\n";
}
print_node_list ( nodelist)

Definition at line 39 of file dom_test.inc.

{
  foreach($nodelist as $node)
  {
    print_node($node);
  }
}

Here is the call graph for this function:


Variable Documentation

PHP $xmlstr
Initial value:
"<?xml version='1.0' standalone='yes'?>
<!DOCTYPE chapter SYSTEM '/share/sgml/Norman_Walsh/db3xml10/db3xml10.dtd'
[ <!ENTITY sp \"spanish\">
]>
<!-- lsfj  -->
<chapter language='en'><title language='en'>Title</title>
<para language='ge'>
&sp;
<!-- comment -->
<informaltable language='&sp;kkk'>
<tgroup cols='3'>
<tbody>
<row><entry>a1</entry><entry morerows='1'>b1</entry><entry>c1</entry></row>
<row><entry>a2</entry><entry>c2</entry></row>
<row><entry>a3</entry><entry>b3</entry><entry>c3</entry></row>
</tbody>
</tgroup>
</informaltable>
</para>
</chapter> "

Definition at line 2 of file dom_test.inc.