public static function fromString( $string )
	{
		// Make sure the string does not contain non-hex characters
		$matched = preg_match( "/[^0-9a-fA-F]+/", $string, $matches );
		if ( $matched || strlen( $string ) % 2 != 0 )
		{
			throw XPath2Exception::withErrorCodeAndParams( "FORG0001", Resources::InvalidFormat, array( $string, "xs:hexBinary" ) );
		}

		$binary = hex2bin( $string );
		return new HexBinaryValue( $binary );
	}
public static function fromString( $string )
	{
		// Make sure the string does not contain non-hex characters
		$matched = preg_match( "/[^0-9a-fA-F]+/", $string, $matches );
		if ( $matched || strlen( $string ) % 2 != 0 )
		{
			throw XPath2Exception::withErrorCodeAndParams( "FORG0001", Resources::InvalidFormat, array( $string, "xs:hexBinary" ) );
		}

		$binary = hex2bin( $string );
		return new HexBinaryValue( $binary );
	}
public static function fromString ( $ string ) { // Make sure the string does not contain non-hex characters
 $ matched = preg_match ( "/[^0-9a-fA-F]+/" , $ string , $ matches ) ; if ( $ matched || strlen ( $ string ) % 2 != 0 ) { throw XPath2Exception :: withErrorCodeAndParams ( "FORG0001" , Resources :: InvalidFormat , array ( $ string , "xs:hexBinary" ) ) ; } $ binary = hex2bin ( $ string ) ; return new HexBinaryValue ( $ binary ) ; }
Convert a string representation of a hex value to is binary version and create a HexBinaryValue instance
@param unknown $string
Convert a string representation of a hex value to is binary version and create a HexBinaryValue instance