Code: Select all
<FormattedSection SectionNumber="1">
<FormattedReportObjects>
<FormattedReportObject FieldName="{Kit.EngrChgOrder}">
<ObjectName>Field32</ObjectName>
<FormattedValue>SNAME</FormattedValue>
<Value>Some Name</Value>
</FormattedReportObject>
<!-- SNIP -->
</FormattedReportObjects>
</FormattedSection>The query works on the XML when I tried it with an online XPath tool. It does not work when I try the following:
Code: Select all
<?php
$file = 'C:/php5/apps/xmlReport/data/test.xml';
$data = new DOMDocument();
$data->load($file);
//load failure check snipped, I know it's loading fine
$xpath = new DOMXPath($data);
$query = "//FormattedReportObject[@FieldName='{Kit.EngrChgOrder}']/FormattedValue";
$result = $xpath->query($query);
foreach($result as $node) {
print_r($node->nodeValue);
}I am, once again, stumped. Any ideas?