+
Point of view
All features
class XML_PARSER
Summary
The standard Liberty Eiffel XML parser. It is able to parse any well-formed WML document, and also can validate a document containing a DTD.
Note that this parser is not namespace-aware, nor does it validate documents using a Schema. Classes to that avail must be built on top of this parser.
See http://www.w3.org/TR/2006/REC-xml11-20060816/
See also XML_CALLBACKS which is called by this parser when a parsing event occurs.
Direct parents
Insert list: URL_VALIDITY, XML_PARSER_TOOLS
Class invariant
Overview
Creation features
{ANY}
Features
{ANY}
{}
{}
{}
{}
parse (a_callbacks: XML_CALLBACKS)
effective procedure
{ANY}
Parse an XML documents by sending parsing events to the given callbacks
require
connect_to (a_url: URL)
effective procedure
{ANY}
require ensure
disconnect
effective procedure
{ANY}
require ensure
is_connected: BOOLEAN
effective function
{ANY}
callbacks: XML_CALLBACKS
writable attribute
{}
url: URL
writable attribute
{}
set_url (a_url: URL)
effective procedure
{}
parse_node (at_root: BOOLEAN): INTEGER_32
effective function
{}
True if a node was successfully parsed
require ensure
read_name: UNICODE_STRING
effective function
{}
parse_attribute (a_buffer: UNICODE_PARSER_BUFFER): INTEGER_32
effective function
{}
if a_buffer if not Void and the attribute is "encoding", set the buffer's encoding.
parse_children: INTEGER_32
effective function
{}
ensure
read_cdata
effective procedure
{}
read_dtd
effective procedure
{}
require
Parse_again: INTEGER_32
is 0
constant attribute
{}
Parse_done: INTEGER_32
is 1
constant attribute
{}
Parse_error: INTEGER_32
is -1
constant attribute
{}
next
effective procedure
{}
require
  • buffer.is_connected
  • not end_of_input
end_of_input: BOOLEAN
effective function
{}
require
  • buffer.is_connected
effective function
{}
ensure
make
effective procedure
{}
Create a not connected parser
dtd_parser: XML_DTD_PARSER
once function
{}
validator: XML_VALIDATOR
effective function
{}
open_buffers: STACK[XML_PARSER_BUFFER]
writable attribute
{}
urls: STACK[URL]
writable attribute
{}
once function
{}
connect_buffer (a_url: URL, a_face_url: URL, a_entity_name: UNICODE_STRING)
effective procedure
{}
require
  • a_face_url /= Void implies a_entity_name /= Void
ensure
connect_buffer_entity_value (entity_name: UNICODE_STRING, entity_value: UNICODE_STRING, entity_url: UNICODE_STRING)
effective procedure
{}
require
  • entity_value /= Void
disconnect_buffer
effective procedure
{}
require ensure
url_pool: RECYCLING_POOL[URL]
once function
{}
line: INTEGER_32
effective function
{ANY}
column: INTEGER_32
effective function
{ANY}
skip_blanks
effective procedure
{}
require
previous
effective procedure
{}
require
current_character: INTEGER_32
effective function
{}
require
skip (character: CHARACTER): BOOLEAN
effective function
{}
require
skip2 (char1: CHARACTER, char2: CHARACTER): BOOLEAN
effective function
{}
require
skip_word (word: STRING): BOOLEAN
effective function
{}
require
  • buffer.is_connected
  • not word.is_empty
is_identifier_start (unicode: INTEGER_32): BOOLEAN
effective function
{}
require
is_identifier_part (unicode: INTEGER_32): BOOLEAN
effective function
{}
require
read_identifier: UNICODE_STRING
effective function
{}
require
read_string: UNICODE_STRING
effective function
{}
require
read_identifier_as_string: STRING
effective function
{}
require
read_string_as_string: STRING
effective function
{}
require
is_separator (unicode: INTEGER_32): BOOLEAN
effective function
{ANY}
is_base_char (unicode: INTEGER_32): BOOLEAN
effective function
{ANY}
is_ideographic (unicode: INTEGER_32): BOOLEAN
effective function
{ANY}
is_combining_char (unicode: INTEGER_32): BOOLEAN
effective function
{ANY}
is_extender (unicode: INTEGER_32): BOOLEAN
effective function
{ANY}
is_letter (unicode: INTEGER_32): BOOLEAN
effective function
{ANY}
is_digit (unicode: INTEGER_32): BOOLEAN
effective function
{ANY}
valid_url (a_url: ABSTRACT_STRING): BOOLEAN
effective function
{ANY}
True if the STRING represents a real URL (i.e. with a known protocol and a valid URI for that protocol)
require
  • a_url /= Void