My XML File Name:'hbwas51_proc_54.xml' this file contain the below content
<database>
<!-- 2006-12-27 15:45:00 IST / 1167214500 --> <row><v> 3.4102666667e+02 </v></row>
<!-- 2006-12-27 15:50:00 IST / 1167214800 --> <row><v> 3.4100000000e+02 </v></row>
<!-- 2006-12-27 15:55:00 IST / 1167215100 --> <row><v> 3.4100000000e+02 </v></row>
<!-- 2006-12-27 16:00:00 IST / 1167215400 --> <row><v> 3.4178333333e+02 </v></row>
<!-- 2006-12-27 16:05:00 IST / 1167215700 --> <row><v> 3.4101333333e+02 </v></row>
<!-- 2006-12-27 16:10:00 IST / 1167216000 --> <row><v> 3.5140000000e+02 </v></row>
<!-- 2006-12-27 16:15:00 IST / 1167216300 --> <row><v> 3.5140000000e+02 </v></row>
<!-- 2006-12-27 16:20:00 IST / 1167216600 --> <row><v> 3.5678666667e+02 </v></row>
<!-- 2006-12-27 16:25:00 IST / 1167216900 --> <row><v> 3.5581333333e+02 </v></row>
<!-- 2006-12-27 16:30:00 IST / 1167217200 --> <row><v> 3.5581333333e+02 </v></row>
<!-- 2006-12-27 16:35:00 IST / 1167217500 --> <row><v> 3.6214000000e+02 </v></row>
<!-- 2006-12-27 16:40:00 IST / 1167217800 --> <row><v> 3.6214000000e+02 </v></row>
<!-- 2006-12-27 16:45:00 IST / 1167218100 --> <row><v> 3.5512000000e+02 </v></row>
<!-- 2006-12-27 16:50:00 IST / 1167218400 --> <row><v> 3.5500000000e+02 </v></row>.
</database>
------------------------------------------
The below PHP code read the row tag values from the above xml file:
Code: Select all
<?php
$doc = new DOMDocument();
$doc->load( 'hbwas51_proc_54.xml' );
$rows = $doc->getElementsByTagName("row");
foreach($rows as $node) {
print $node->textContent . " ";
}
Now i want to read the comment lines <!-- 2006-12-27 15:45:00 IST / 1167214500 --> from the above XML File.
Thanks for your help.