PHP xml_get_current_column_number() Function
Complete PHP XML Reference
Definition and Usage
The xml_get_current_column_number() function gets the current column number for
an XML parser.
This function returns the current column number on success, or FALSE on
failure.
Syntax
xml_get_current_column_number(parser)
|
Parameter |
Description |
parser |
Required. Specifies XML parser to use |
Example
<?php
//invalid xml file
$xmlfile = 'test.xml';
$xmlparser = xml_parser_create();
// open a file and read data
$fp = fopen($xmlfile, 'r');
while ($xmldata = fread($fp, 4096))
{
// parse the data chunk
if (!xml_parse($xmlparser,$xmldata,feof($fp)))
{
die( print "ERROR: "
. xml_error_string(xml_get_error_code($xmlparser))
. "<br />"
. "Line: "
. xml_get_current_line_number($xmlparser)
. "<br />"
. "Column: "
. xml_get_current_column_number($xmlparser)
. "<br />");
}
}
xml_parser_free($xmlparser);
?>
|
The output of the code above could be:
ERROR: Mismatched tag
Line: 5
Column: 41
|
Complete PHP XML Reference
Make your web applications look like a million bucks
|
|
Most web applications today use boring methods to present data to their viewers using grids or simple HTML tables. FusionCharts induces "life" into the web applications by converting monotonous data into lively charts, gauges & maps.
FusionCharts works with all technologies like ASP, ASP.NET, PHP, ColdFusion, Ruby on Rails, JSP, HTML pages etc.
and connects to any database to render animated & interactive charts. It takes less than 15 minutes and no expertise
whatsoever to build your first chart and just a glance of it to captivate your audience. This fact is endorsed by our
12,000 customers and 150,000 users which include a majority of the Fortune 500 companies.
And yeah, your applications could look like a million bucks by spending just $69.
So go ahead, download your
copy of FusionCharts and start "wow-ing" your customers now!
|
|