<?php

class syntax_plugin_svg_parser
{
	var $width;
	var $height;
	
	function parse( $xml_data )
	{
		$xmlp = xml_parser_create();
		
		xml_set_object( $xmlp, $this );
		
		xml_set_element_handler( $xmlp, 'start_element', false );
		
		xml_parse( $xmlp, $xml_data );
		
		xml_parser_free( $xmlp );
	}
	
	function start_element( $parser, $name, $attribs )
	{
		if( strtolower( $name ) == 'svg' )
		{
			$this->width = $attribs[ 'WIDTH' ];
			$this->height = $attribs[ 'HEIGHT' ];
		}
	}
}

?>
