Another Programmers Are Human Moment

I wrote a PHP script that takes the details of an HL7 interface stored as XML and presents it in a nice neat HTML table.

The formatting is customized so most XML to HTML table tools won’t work for this.

As I parse the details out of the XML structure, I write them to the string $output.

I had everything working except for the parameters.

I gather the parameters by storing the XQuery paths into an array and iterate through that adding the details to the html table.

That bit wasn’t working.

I added some code to ensure that I was stepping through the array, and that the information was correct.

It took me about 20 minutes to see it….can you see the problem?


$output .= '<tr class="mdiparms">';

foreach($nxqArr as $nxq) {
         $ouput .= '<td>'.getNodeValue($nxq).'</td>';
}

$outout .= '</tr></table>';

Definitely an end of the day /facepalm moment!

Advertisements

2 thoughts on “Another Programmers Are Human Moment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s