read functions
[Parser]


Detailed Description

This module contains all reading functions.


Functions

xistreamread_qname (xistream &xis, xstring &localPart, xstring &prefix)
xistreamread_ns_att_name (xistream &xis, xstring &xstr, int nb_read)
xstring replace_char_ref (const xstring &xstr)
xistreamread_xml_decl (xistream &xis, int nb_read)
xistreamread_notation_decl (xistream &xis, int nb_read)
xistreamread_pe_def (xistream &xis, xstring &entity_value, xstring &system_literal, xstring &pub_id_literal)
xistreamread_entity_def (xistream &xis, xstring &entity_value, xstring &system_literal, xstring &pub_id_literal, xstring &ndata_name)
xistreamread_pe_decl (xistream &xis, xstring &entity_name, xstring &entity_value, xstring &system_literal, xstring &pubid_literal, int nb_read)
xistreamread_pe_decl (xistream &xis, int nb_read)
xistreamread_ge_decl (xistream &xis, xstring &entity_name, xstring &entity_value, xstring &system_literal, xstring &pubid_literal, xstring &ndata_name, int nb_read)
xistreamread_ge_decl (xistream &xis, int nb_read)
xistreamread_misc (xistream &xis)
size_t read_bom (xistream &xis)
xistreamread_doctype_decl (xistream &xis, int nb_read)
xistreamread_prolog (xistream &xis)
xistreamread_element_decl (xistream &xis, int nb_read)
xistreamread_att_list_decl (xistream &xis, int nb_read)
xistreamread_entity_decl (xistream &xis, int nb_read)
XIMOL_EXPORT xistreamread_xchar (xistream &xis, xchar_t xc, const::std::wstring &error_msg=L"")
 read Special char.

XIMOL_EXPORT xistreamread_xchar (xistream &xis, xchar_t &xc, bool(*is_good_xchar)(xchar_t), const::std::wstring &error_msg=L"")
 read Char defined by a function.

XIMOL_EXPORT xistreamread_xstring (xistream &xis, xstring &xstr, bool(*is_good_xchar)(xchar_t), bool erase_string=true)
 read string defined by a function.

XIMOL_EXPORT xistreamread_xstring (xistream &xistream_, const::std::string &str_, const::std::wstring &strErrorMsg_=L"", size_t size_=0)
 read Special string.

XIMOL_EXPORT xistreamread_string_with_forbidden_serie (xistream &xis, xstring &xstr, bool(*is_good_xchar)(xchar_t), const::std::string &forbidden_string)
XIMOL_EXPORT xistreamread_space (xistream &xis)
XIMOL_EXPORT xistreamread_optionnal_space (xistream &xis)
XIMOL_EXPORT xistreamread_name (xistream &xis, xstring &xstr)
XIMOL_EXPORT xistreamread_ncname (xistream &xis, xstring &xstr)
XIMOL_EXPORT xistreamread_char_data (xistream &xis, xstring &xstr)
XIMOL_EXPORT xistreamread_nm_token (xistream &xis, xstring &xstr)
XIMOL_EXPORT xistreamread_char_ref (xistream &xis, xchar_t &xc, int nb_read=0)
XIMOL_EXPORT xistreamread_entity_ref (xistream &xis, int nb_read=0)
XIMOL_EXPORT xistreamread_pe_reference (xistream &xis, xstring &xstr, int nb_read=0)
XIMOL_EXPORT xistreamread_reference (xistream &xis, xstring &xstr, int nb_read=0)
XIMOL_EXPORT xistreamread_pubid_literal (xistream &xis, xstring &xstr)
XIMOL_EXPORT xistreamread_system_literal (xistream &xis, xstring &xstr)
XIMOL_EXPORT xistreamread_entity_value (xistream &xis, xstring &xstr)
XIMOL_EXPORT xistreamread_att_value (xistream &xis, xstring &xstr)
XIMOL_EXPORT xistreamread_attribute (xistream &xis, xstring &name, xstring &att_value, xstring &short_ns)
XIMOL_EXPORT xistreamread_comment (xistream &xis, xstring &xstr, int nb_read=0)
XIMOL_EXPORT xistreamread_comment (xistream &xis, int nb_read=0)
XIMOL_EXPORT xistreamread_pi_target (xistream &xis, xstring &xstr)
XIMOL_EXPORT xistreamread_pi (xistream &xis, xstring &pi_target, xstring &xext, int nb_read=0)
XIMOL_EXPORT xistreamread_pi (xistream &xis, int nb_read=0)
XIMOL_EXPORT xistreamread_cd_end (xistream &xis, int nb_read=0)
XIMOL_EXPORT xistreamread_cd_start (xistream &xis, int nb_read=0)
XIMOL_EXPORT xistreamread_cdata (xistream &xis, xstring &xstr)
XIMOL_EXPORT xistreamread_cd_sect (xistream &xis, xstring &xstr, int nb_char=0)
XIMOL_EXPORT xistreamread_eq (xistream &xis)
XIMOL_EXPORT xistreamread_version_num (xistream &xis, xstring &xstr)
XIMOL_EXPORT xistreamread_version_info (xistream &xis, xstring &xstr, bool read_first_space=true)
XIMOL_EXPORT xistreamread_version_info (xistream &xis, bool read_first_space=true)
XIMOL_EXPORT xistreamread_enc_name (xistream &xis, xstring &xstr)
XIMOL_EXPORT xistreamread_encoding_decl (xistream &xis, xstring &xstr, bool read_first_space=true)
XIMOL_EXPORT xistreamread_sd_decl (xistream &xis, bool &standalone, bool read_first_space=true)
XIMOL_EXPORT xistreamread_xml_decl (xistream &xis, xstring &version_info, xstring &encoding_decl, bool &standalone_decl, int nb_read=0)
XIMOL_EXPORT xistreamread_external_id (xistream &xis, xstring &system_literal, xstring &pub_id_literal)
XIMOL_EXPORT xistreamread_public_id (xistream &xis, xstring &pub_id_literal)
XIMOL_EXPORT xistreamread_notation_decl (xistream &xis, xstring &name, xstring &system_literal, xstring &pub_id_literal, int nb_read=0)
XIMOL_EXPORT xistreamread_open_stag (xistream &xis, xstring &name, XIMOL_XML_NAMESPACE_PATH::attributes &att, xstring &uri, int nb_read=0)
XIMOL_EXPORT xistreamread_open_stag (xistream &xis, xstring &name, xstring &uri, int nb_read=0)
XIMOL_EXPORT xistreamread_open_stag (xistream &xis, xstring &name, int nb_read=0)
XIMOL_EXPORT xistreamread_stag (xistream &xis, xstring &name, XIMOL_XML_NAMESPACE_PATH::attributes &att, xstring &uri, int nb_read=0)
XIMOL_EXPORT xistreamread_stag (xistream &xis, xstring &name, XIMOL_XML_NAMESPACE_PATH::attributes &att, int nb_read=0)
XIMOL_EXPORT xistreamread_stag (xistream &xis, xstring &name, xstring &uri, int nb_read=0)
XIMOL_EXPORT xistreamread_stag (xistream &xis, xstring &name, int nb_read=0)
XIMOL_EXPORT xistreamread_etag (xistream &xis, xstring &name, xstring &uri, int nb_read=0)
XIMOL_EXPORT xistreamread_etag (xistream &xis, xstring &name, int nb_read=0)
XIMOL_EXPORT xistreamread_etag (xistream &xis, int nb_read=0)
XIMOL_EXPORT xistreamread_ndata_decl (xistream &xis, xstring &name, int nb_read=0)


Function Documentation

XIMOL_EXPORT xistream & read_att_list_decl xistream xis,
int  nb_read = 0
 

AttlistDecl ::= '<!ATTLIST' S name AttDef* S? '>'

Definition at line 3581 of file utils.cpp.

References _(), xistream::get(), read_space(), read_xchar(), XCHAR_EXCLAMATION_MARK, XCHAR_GREATER_THAN_SIGN, XCHAR_LATIN_CAPITAL_LETTER_A, XCHAR_LATIN_CAPITAL_LETTER_I, XCHAR_LATIN_CAPITAL_LETTER_L, XCHAR_LATIN_CAPITAL_LETTER_S, XCHAR_LATIN_CAPITAL_LETTER_T, XCHAR_LESS_THAN_SIGN, and xchar_t.

Referenced by read_doctype_element().

XIMOL_EXPORT xistream& read_att_value xistream xis,
xstring xstr
 

AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'"
we use only the value without quote.

Definition at line 1394 of file utils.cpp.

References _(), clear_string(), xistream::get(), is_char(), IsQuote(), xistream::putback(), read_char_ref(), read_reference(), read_xchar(), ToQuoteRef(), XCHAR_AMPERSAND, XCHAR_NUMBER_SIGN, xchar_t, XIMOL_AS_ERROR, XIMOL_THROW, and xstring.

Referenced by read_attribute().

XIMOL_EXPORT xistream& read_attribute xistream xis,
xstring name,
xstring att_value,
xstring short_ns
 

Attribute ::= name Eq AttValue
we use only the value without quote.

Definition at line 1457 of file utils.cpp.

References read_att_value(), read_eq(), read_qname(), and xstring.

Referenced by attributes::read().

XIMOL_EXPORT size_t read_bom xistream xis  ) 
 

Returns:
number of char crunch. char of the '<?xml'

Definition at line 3179 of file utils.cpp.

References _(), AfterBOM(), BeforeBOM(), xistream::encoding(), xistream::get(), xistream::putback(), xchar_t, XIMOL_AS_ERROR, and XIMOL_THROW.

Referenced by read_prolog().

XIMOL_EXPORT xistream& read_cd_end xistream xis,
int  nb_read = 0
 

cd_end ::= ']]>'

Definition at line 1690 of file utils.cpp.

References _(), read_xchar(), XCHAR_GREATER_THAN_SIGN, and XCHAR_RIGHT_SQUARE_BRACKET.

Referenced by cd_end(), and read_cd_sect().

XIMOL_EXPORT xistream& read_cd_sect xistream xis,
xstring xstr,
int  nb_char = 0
 

cd_sect ::= cd_start CData cd_end

Definition at line 1793 of file utils.cpp.

References read_cd_end(), read_cd_start(), read_cdata(), and xstring.

Referenced by char_data_content(), and operator>>().

XIMOL_EXPORT xistream& read_cd_start xistream xis,
int  nb_read = 0
 

cd_start ::= '<![CDATA['

Definition at line 1725 of file utils.cpp.

References _(), read_xchar(), XCHAR_EXCLAMATION_MARK, XCHAR_LATIN_CAPITAL_LETTER_A, XCHAR_LATIN_CAPITAL_LETTER_C, XCHAR_LATIN_CAPITAL_LETTER_D, XCHAR_LATIN_CAPITAL_LETTER_T, XCHAR_LEFT_SQUARE_BRACKET, and XCHAR_LESS_THAN_SIGN.

Referenced by cd_start(), and read_cd_sect().

XIMOL_EXPORT xistream& read_cdata xistream xis,
xstring xstr
 

CData ::= (Char* - (Char* ']]>' Char*))

Definition at line 1769 of file utils.cpp.

References is_char(), read_string_with_forbidden_serie(), and xstring.

Referenced by read_cd_sect().

XIMOL_EXPORT xistream& read_char_data xistream xis,
xstring xstr
 

CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)
the reading is stop by '<' or '&' or ']]>' and we putback only one char '<' or '&' or '>'

Definition at line 874 of file utils.cpp.

References IsNotAndOrInf(), read_string_with_forbidden_serie(), and xstring.

XIMOL_EXPORT xistream& read_char_ref xistream xis,
xchar_t xc,
int  nb_read = 0
 

CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'
if read_first_char==true then the char '&' is not read.

Definition at line 966 of file utils.cpp.

References _(), xistream::front(), xistream::get(), is_digit(), is_in_range(), xistream::pop_front(), xistream::putback(), read_xchar(), XCHAR_AMPERSAND, XCHAR_LATIN_CAPITAL_LETTER_A, XCHAR_LATIN_CAPITAL_LETTER_F, XCHAR_LATIN_SMALL_LETTER_A, XCHAR_LATIN_SMALL_LETTER_F, XCHAR_LATIN_SMALL_LETTER_X, XCHAR_NUMBER_SIGN, XCHAR_SEMICOLON, and xchar_t.

Referenced by read_att_value(), read_entity_value(), read_reference(), and replace_char_ref().

XIMOL_EXPORT xistream& read_comment xistream xis,
int  nb_read = 0
 

comment ::= ''

Definition at line 1534 of file utils.cpp.

References xstring.

Referenced by char_data_content(), operator>>(), read_doctype_element(), read_misc(), and read_prolog_exclamation().

XIMOL_EXPORT xistream& read_comment xistream xis,
xstring xstr,
int  nb_read = 0
 

comment ::= ''

Definition at line 1511 of file utils.cpp.

References _(), clear_string(), is_char(), read_string_with_forbidden_serie(), read_xchar(), XCHAR_EXCLAMATION_MARK, XCHAR_GREATER_THAN_SIGN, XCHAR_HYPHEN_MINUS, XCHAR_LESS_THAN_SIGN, and xstring.

XIMOL_EXPORT xistream & read_doctype_decl xistream xis,
int  nb_read = 0
 

doctypedecl ::= '<!DOCTYPE' S name (S ExternalID)? S? ('[' (markupdecl | DeclSep)* ']' S?)? '>'

Definition at line 3357 of file utils.cpp.

References _(), xistream::context, xistream::front(), xistream::get(), xistream::pop_front(), xistream::putback(), read_doctype_element(), read_external_id(), read_name(), read_optionnal_space(), read_pe_reference(), read_pi(), read_space(), read_xchar(), XCHAR_EXCLAMATION_MARK, XCHAR_GREATER_THAN_SIGN, XCHAR_LATIN_CAPITAL_LETTER_C, XCHAR_LATIN_CAPITAL_LETTER_D, XCHAR_LATIN_CAPITAL_LETTER_E, XCHAR_LATIN_CAPITAL_LETTER_O, XCHAR_LATIN_CAPITAL_LETTER_P, XCHAR_LATIN_CAPITAL_LETTER_T, XCHAR_LATIN_CAPITAL_LETTER_Y, XCHAR_LEFT_SQUARE_BRACKET, XCHAR_LESS_THAN_SIGN, XCHAR_PERCENT_SIGN, XCHAR_QUESTION_MARK, XCHAR_RIGHT_SQUARE_BRACKET, xchar_t, XIMOL_AS_ERROR, XIMOL_THROW, and xstring.

Referenced by read_prolog_exclamation().

XIMOL_EXPORT xistream & read_element_decl xistream xis,
int  nb_read = 0
 

elementdecl ::= '<!ELEMENT' S name S contentspec S? '>'

Definition at line 3548 of file utils.cpp.

References _(), xistream::get(), read_space(), read_xchar(), XCHAR_EXCLAMATION_MARK, XCHAR_GREATER_THAN_SIGN, XCHAR_LATIN_CAPITAL_LETTER_E, XCHAR_LATIN_CAPITAL_LETTER_L, XCHAR_LATIN_CAPITAL_LETTER_M, XCHAR_LATIN_CAPITAL_LETTER_N, XCHAR_LATIN_CAPITAL_LETTER_T, XCHAR_LESS_THAN_SIGN, and xchar_t.

Referenced by read_doctype_element().

XIMOL_EXPORT xistream& read_enc_name xistream xis,
xstring xstr
 

EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*

Definition at line 2003 of file utils.cpp.

References _(), clear_string(), IsFirstEncNameChar(), IsSecondEncNameChar(), read_xchar(), read_xstring(), xchar_t, and xstring.

Referenced by read_encoding_decl().

XIMOL_EXPORT xistream& read_encoding_decl xistream xis,
xstring xstr,
bool  read_first_space = true
 

EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'" )

Definition at line 2037 of file utils.cpp.

References _(), xistream::context, IsQuote(), read_enc_name(), read_eq(), read_space(), read_xchar(), read_xstring(), xchar_t, and xstring.

Referenced by read_xml_decl().

XIMOL_EXPORT xistream & read_entity_decl xistream xis,
int  nb_read = 0
 

EntityDecl ::= GEDecl | PEDecl

Definition at line 3614 of file utils.cpp.

References _(), xistream::front(), read_ge_decl(), read_pe_decl(), read_space(), read_xchar(), XCHAR_EXCLAMATION_MARK, XCHAR_LATIN_CAPITAL_LETTER_E, XCHAR_LATIN_CAPITAL_LETTER_I, XCHAR_LATIN_CAPITAL_LETTER_N, XCHAR_LATIN_CAPITAL_LETTER_T, XCHAR_LATIN_CAPITAL_LETTER_Y, XCHAR_LESS_THAN_SIGN, XCHAR_PERCENT_SIGN, and xchar_t.

Referenced by read_doctype_element().

XIMOL_EXPORT xistream & read_entity_def xistream xis,
xstring entity_value,
xstring system_literal,
xstring pub_id_literal,
xstring ndata_name
 

EntityDef ::= entity_value | (ExternalID NDataDecl?)

Definition at line 2869 of file utils.cpp.

References clear_string(), xistream::get(), xistream::putback(), read_entity_value(), read_external_id(), read_ndata_decl(), read_optionnal_space(), XCHAR_LATIN_CAPITAL_LETTER_N, XCHAR_LATIN_CAPITAL_LETTER_P, XCHAR_LATIN_CAPITAL_LETTER_S, xchar_t, and xstring.

Referenced by read_ge_decl().

XIMOL_EXPORT xistream& read_entity_ref xistream xis,
int  nb_read = 0
 

EntityRef ::= '&' name ';'

Definition at line 1059 of file utils.cpp.

References _(), xistream::context, xistream::putback(), read_name(), read_xchar(), XCHAR_AMPERSAND, XCHAR_SEMICOLON, and xstring.

Referenced by read_reference().

XIMOL_EXPORT xistream& read_entity_value xistream xis,
xstring xstr
 

entity_value ::= '"' ([^%&"] | PEReference | Reference)* '"' | "'" ([^%&'] | PEReference | Reference)* "'"
we use only the value without quote.

Definition at line 1304 of file utils.cpp.

References _(), clear_string(), xistream::get(), is_char(), IsQuote(), xistream::putback(), read_char_ref(), read_name(), read_pe_reference(), read_xchar(), ToQuoteRef(), XCHAR_AMPERSAND, XCHAR_NUMBER_SIGN, XCHAR_PERCENT_SIGN, XCHAR_SEMICOLON, xchar_t, XIMOL_AS_ERROR, XIMOL_THROW, and xstring.

Referenced by read_entity_def(), and read_pe_def().

XIMOL_EXPORT xistream& read_eq xistream xis  ) 
 

Eq ::= S? '=' S?

Definition at line 1817 of file utils.cpp.

References _(), read_optionnal_space(), read_xchar(), and XCHAR_EQUALS_SIGN.

Referenced by read_attribute(), read_encoding_decl(), read_sd_decl(), and read_version_info().

XIMOL_EXPORT xistream& read_etag xistream xis,
int  nb_read = 0
 

etag ::= '</' QName S? '>'

Definition at line 2740 of file utils.cpp.

References xistream::context, and xstring.

Referenced by drop_next_element(), operator>>(), reader_policy::by_default< qname_type, abs_reader_type >::read(), and read_etag().

XIMOL_EXPORT xistream& read_etag xistream xis,
xstring name,
int  nb_read = 0
 

etag ::= '</' QName S? '>'

Definition at line 2728 of file utils.cpp.

References read_etag(), and xstring.

XIMOL_EXPORT xistream& read_etag xistream xis,
xstring name,
xstring uri,
int  nb_read = 0
 

etag ::= '</' QName S? '>'

Definition at line 2690 of file utils.cpp.

References _(), clear_string(), xistream::context, read_optionnal_space(), read_qname(), read_xchar(), XCHAR_GREATER_THAN_SIGN, XCHAR_LESS_THAN_SIGN, XCHAR_SOLIDUS, and xstring.

XIMOL_EXPORT xistream& read_external_id xistream xis,
xstring system_literal,
xstring pub_id_literal
 

ExternalID ::= 'SYSTEM' S system_literal | 'PUBLIC' S pubid_literal S system_literal

Definition at line 2261 of file utils.cpp.

References _(), clear_string(), IsExternalCharSP(), xistream::putback(), read_pubid_literal(), read_space(), read_system_literal(), read_xchar(), read_xstring(), XCHAR_LATIN_CAPITAL_LETTER_P, xchar_t, and xstring.

Referenced by read_doctype_decl(), read_entity_def(), and read_pe_def().

XIMOL_EXPORT xistream & read_ge_decl xistream xis,
int  nb_read = 0
 

GEDecl ::= '<!ENTITY' S name S EntityDef S? '>'

Definition at line 3029 of file utils.cpp.

References xstring.

Referenced by read_entity_decl().

XIMOL_EXPORT xistream & read_ge_decl xistream xis,
xstring entity_name,
xstring entity_value,
xstring system_literal,
xstring pubid_literal,
xstring ndata_name,
int  nb_read = 0
 

GEDecl ::= '<!ENTITY' S name S EntityDef S? '>'

Definition at line 2996 of file utils.cpp.

References _(), xistream::context, read_entity_def(), read_name(), read_optionnal_space(), read_space(), read_xchar(), XCHAR_EXCLAMATION_MARK, XCHAR_GREATER_THAN_SIGN, XCHAR_LATIN_CAPITAL_LETTER_E, XCHAR_LATIN_CAPITAL_LETTER_I, XCHAR_LATIN_CAPITAL_LETTER_N, XCHAR_LATIN_CAPITAL_LETTER_T, XCHAR_LATIN_CAPITAL_LETTER_Y, XCHAR_LESS_THAN_SIGN, and xstring.

XIMOL_EXPORT xistream & read_misc xistream xis  ) 
 

Misc ::= comment | PI | S

Definition at line 3043 of file utils.cpp.

References _(), xistream::front(), xistream::get(), is_space(), xistream::putback(), read_comment(), read_optionnal_space(), read_pi(), XCHAR_EXCLAMATION_MARK, XCHAR_LESS_THAN_SIGN, XCHAR_QUESTION_MARK, xchar_t, XIMOL_AS_ERROR, and XIMOL_THROW.

XIMOL_EXPORT xistream& read_name xistream xis,
xstring xstr
 

name ::= (Letter | '_' | ':') (NameChar)*

Definition at line 608 of file utils.cpp.

References _(), clear_string(), is_first_char_name(), is_name_char(), read_xchar(), read_xstring(), xchar_t, and xstring.

Referenced by read_doctype_decl(), read_entity_ref(), read_entity_value(), read_ge_decl(), read_ndata_decl(), read_notation_decl(), read_pe_decl(), read_pe_reference(), and read_pi_target().

XIMOL_EXPORT xistream& read_ncname xistream xis,
xstring xstr
 

NCName ::= (Letter | '_') (NCNameChar)*

Definition at line 671 of file utils.cpp.

References _(), clear_string(), is_first_char_ncname(), IsNCNameChar(), read_xchar(), read_xstring(), xchar_t, and xstring.

Referenced by read_ns_att_name(), and read_qname().

XIMOL_EXPORT xistream& read_ndata_decl xistream xis,
xstring name,
int  nb_read = 0
 

NDataDecl ::= S 'NDATA' S name

Definition at line 2829 of file utils.cpp.

References _(), read_name(), read_space(), read_xchar(), XCHAR_LATIN_CAPITAL_LETTER_A, XCHAR_LATIN_CAPITAL_LETTER_D, XCHAR_LATIN_CAPITAL_LETTER_N, XCHAR_LATIN_CAPITAL_LETTER_T, and xstring.

Referenced by read_entity_def().

XIMOL_EXPORT xistream& read_nm_token xistream xis,
xstring xstr
 

Nmtoken ::= (NameChar)+

Definition at line 913 of file utils.cpp.

References _(), clear_string(), is_name_char(), read_xchar(), read_xstring(), xchar_t, and xstring.

XIMOL_EXPORT xistream& read_notation_decl xistream xis,
xstring name,
xstring system_literal,
xstring pub_id_literal,
int  nb_read = 0
 

NotationDecl ::= '<!NOTATION' S name S (ExternalID | PublicID) S? '>'

Definition at line 2338 of file utils.cpp.

References _(), clear_string(), xistream::get(), IsExternalCharSP(), xistream::putback(), read_name(), read_optionnal_space(), read_pubid_literal(), read_space(), read_system_literal(), read_xchar(), read_xstring(), XCHAR_EXCLAMATION_MARK, XCHAR_GREATER_THAN_SIGN, XCHAR_LATIN_CAPITAL_LETTER_A, XCHAR_LATIN_CAPITAL_LETTER_I, XCHAR_LATIN_CAPITAL_LETTER_N, XCHAR_LATIN_CAPITAL_LETTER_O, XCHAR_LATIN_CAPITAL_LETTER_P, XCHAR_LATIN_CAPITAL_LETTER_T, XCHAR_LESS_THAN_SIGN, xchar_t, and xstring.

Referenced by read_doctype_element(), and read_notation_decl().

XIMOL_EXPORT xistream & read_notation_decl xistream xis,
int  nb_read = 0
 

NotationDecl ::= '<!NOTATION' S name S (ExternalID | PublicID) S? '>'

Definition at line 2398 of file utils.cpp.

References xistream::context, read_notation_decl(), and xstring.

XIMOL_EXPORT xistream & read_ns_att_name xistream xis,
xstring xstr,
int  nb_read = 0
 

Returns:
only the NCName.
NSAttName ::= PrefixedAttName | DefaultAttName PrefixedAttName ::= 'xmlns:' NCName DefaultAttName ::= 'xmlns'

Definition at line 799 of file utils.cpp.

References _(), clear_string(), xistream::front(), xistream::pop_front(), read_ncname(), read_xchar(), XCHAR_COLON, XCHAR_LATIN_SMALL_LETTER_L, XCHAR_LATIN_SMALL_LETTER_M, XCHAR_LATIN_SMALL_LETTER_N, XCHAR_LATIN_SMALL_LETTER_S, XCHAR_LATIN_SMALL_LETTER_X, xchar_t, and xstring.

XIMOL_EXPORT xistream& read_open_stag xistream xis,
xstring name,
int  nb_read = 0
 

stag ::= '<' QName (S Attribute)* S? '>'

Definition at line 2567 of file utils.cpp.

References xstring.

Referenced by operator>>(), reader_policy::by_default< qname_type, abs_reader_type >::read(), read_open_stag(), and read_stag().

XIMOL_EXPORT xistream& read_open_stag xistream xis,
xstring name,
xstring uri,
int  nb_read = 0
 

stag ::= '<' QName (S Attribute)* S? '>'

Definition at line 2555 of file utils.cpp.

References read_open_stag(), and xstring.

XIMOL_EXPORT xistream& read_open_stag xistream xis,
xstring name,
XIMOL_XML_NAMESPACE_PATH::attributes att,
xstring uri,
int  nb_read = 0
 

stag ::= '<' QName (S Attribute)* S? '>'

Definition at line 2487 of file utils.cpp.

References _(), clear_string(), xistream::context, xistream::get(), xistream::putback(), read_optionnal_space(), read_qname(), read_xchar(), XCHAR_GREATER_THAN_SIGN, XCHAR_LESS_THAN_SIGN, XCHAR_SOLIDUS, xchar_t, XIMOL_AS_ERROR, XIMOL_THROW, and xstring.

XIMOL_EXPORT xistream& read_optionnal_space xistream xis  ) 
 

S ::= (x20 | x9 | xD | xA)

Definition at line 565 of file utils.cpp.

References is_space(), read_xstring(), and xstring.

Referenced by drop_space(), is_etag(), is_stag(), operator>>(), attributes::read(), read_doctype_decl(), read_entity_def(), read_eq(), read_etag(), read_ge_decl(), read_misc(), read_notation_decl(), read_open_stag(), read_pe_decl(), read_pi(), read_prolog(), read_space(), and read_xml_decl().

XIMOL_EXPORT xistream & read_pe_decl xistream xis,
int  nb_read = 0
 

PEDecl ::= '<!ENTITY' S '%' S name S PEDef S? '>'

Definition at line 2963 of file utils.cpp.

References xstring.

Referenced by read_entity_decl().

XIMOL_EXPORT xistream & read_pe_decl xistream xis,
xstring entity_name,
xstring entity_value,
xstring system_literal,
xstring pubid_literal,
int  nb_read = 0
 

PEDecl ::= '<!ENTITY' S '%' S name S PEDef S? '>'

Definition at line 2928 of file utils.cpp.

References _(), xistream::context, read_name(), read_optionnal_space(), read_pe_def(), read_space(), read_xchar(), XCHAR_EXCLAMATION_MARK, XCHAR_GREATER_THAN_SIGN, XCHAR_LATIN_CAPITAL_LETTER_E, XCHAR_LATIN_CAPITAL_LETTER_I, XCHAR_LATIN_CAPITAL_LETTER_N, XCHAR_LATIN_CAPITAL_LETTER_T, XCHAR_LATIN_CAPITAL_LETTER_Y, XCHAR_LESS_THAN_SIGN, XCHAR_PERCENT_SIGN, and xstring.

XIMOL_EXPORT xistream & read_pe_def xistream xis,
xstring entity_value,
xstring system_literal,
xstring pub_id_literal
 

PEDef ::= entity_value | ExternalID

Definition at line 2777 of file utils.cpp.

References clear_string(), xistream::get(), xistream::putback(), read_entity_value(), read_external_id(), XCHAR_LATIN_CAPITAL_LETTER_P, XCHAR_LATIN_CAPITAL_LETTER_S, xchar_t, and xstring.

Referenced by read_pe_decl().

XIMOL_EXPORT xistream& read_pe_reference xistream xis,
xstring xstr,
int  nb_read = 0
 

PEReference ::= '%' name ';'

Definition at line 1099 of file utils.cpp.

References _(), clear_string(), xistream::context, read_name(), read_xchar(), XCHAR_PERCENT_SIGN, XCHAR_SEMICOLON, and xstring.

Referenced by read_doctype_decl(), and read_entity_value().

XIMOL_EXPORT xistream& read_pi xistream xis,
int  nb_read = 0
 

PI ::= '<?' pi_target (S (Char* - (Char* '?>' Char*)))? '?>'

Definition at line 1664 of file utils.cpp.

References xistream::context, and xstring.

Referenced by char_data_content(), read_doctype_decl(), read_misc(), and read_prolog_question().

XIMOL_EXPORT xistream& read_pi xistream xis,
xstring pi_target,
xstring xext,
int  nb_read = 0
 

PI ::= '<?' pi_target (S (Char* - (Char* '?>' Char*)))? '?>'

Definition at line 1637 of file utils.cpp.

References _(), clear_string(), is_char(), read_optionnal_space(), read_pi_target(), read_string_with_forbidden_serie(), read_xchar(), XCHAR_GREATER_THAN_SIGN, XCHAR_LESS_THAN_SIGN, XCHAR_QUESTION_MARK, and xstring.

XIMOL_EXPORT xistream& read_pi_target xistream xis,
xstring xstr
 

pi_target ::= name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))

Definition at line 1590 of file utils.cpp.

References _(), is_pi_target(), read_name(), XIMOL_AS_ERROR, XIMOL_THROW, and xstring.

Referenced by read_pi().

XIMOL_EXPORT xistream & read_prolog xistream xis  ) 
 

prolog ::= XMLDecl? Misc* (doctypedecl Misc*)?

Definition at line 3510 of file utils.cpp.

References xistream::front(), xistream::get(), xistream::putback(), read_bom(), read_optionnal_space(), read_prolog_exclamation(), read_prolog_question(), XCHAR_EXCLAMATION_MARK, XCHAR_LESS_THAN_SIGN, XCHAR_QUESTION_MARK, and xchar_t.

Referenced by operator>>().

XIMOL_EXPORT xistream& read_pubid_literal xistream xis,
xstring xstr
 

pubid_literal ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'"
we use only the value without quote.

Definition at line 1185 of file utils.cpp.

References _(), is_pubid_char(), IsQuote(), read_string_with_forbidden_serie(), read_xchar(), XCHAR_APOSTROPHE, XCHAR_QUOTATION_MARK, xchar_t, and xstring.

Referenced by read_external_id(), read_notation_decl(), and read_public_id().

XIMOL_EXPORT xistream& read_public_id xistream xis,
xstring pub_id_literal
 

PublicID ::= 'PUBLIC' S pubid_literal

Definition at line 2304 of file utils.cpp.

References _(), clear_string(), read_pubid_literal(), read_space(), read_xstring(), and xstring.

XIMOL_EXPORT xistream & read_qname xistream xis,
xstring localPart,
xstring prefix
 

QName ::= (Prefix ':')? LocalPart Prefix ::= NCName LocalPart ::= NCName

Definition at line 730 of file utils.cpp.

References clear_string(), xistream::front(), xistream::pop_front(), read_ncname(), XCHAR_COLON, and xstring.

Referenced by read_attribute(), read_etag(), and read_open_stag().

XIMOL_EXPORT xistream& read_reference xistream xis,
xstring xstr,
int  nb_read = 0
 

Reference ::= EntityRef | CharRef

Definition at line 1121 of file utils.cpp.

References _(), clear_string(), xistream::front(), read_char_ref(), read_entity_ref(), read_xchar(), XCHAR_AMPERSAND, XCHAR_NUMBER_SIGN, xchar_t, and xstring.

Referenced by char_data_content(), and read_att_value().

XIMOL_EXPORT xistream& read_sd_decl xistream xis,
bool &  standalone,
bool  read_first_space = true
 

SDDecl ::= S 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"'))

Definition at line 2075 of file utils.cpp.

References _(), xistream::context, IsFirstEncNameChar(), IsQuote(), read_eq(), read_space(), read_xchar(), read_xstring(), xchar_t, XIMOL_AS_ERROR, XIMOL_THROW, and xstring.

Referenced by read_xml_decl().

XIMOL_EXPORT xistream& read_space xistream xis  ) 
 

S ::= (x20 | x9 | xD | xA)

Definition at line 555 of file utils.cpp.

References _(), is_space(), read_optionnal_space(), read_xchar(), and xchar_t.

Referenced by read_att_list_decl(), read_doctype_decl(), read_element_decl(), read_encoding_decl(), read_entity_decl(), read_external_id(), read_ge_decl(), read_ndata_decl(), read_notation_decl(), read_pe_decl(), read_public_id(), read_sd_decl(), and read_version_info().

XIMOL_EXPORT xistream& read_stag xistream xis,
xstring name,
int  nb_read = 0
 

stag ::= '<' QName (S Attribute)* S? '>'

Definition at line 2630 of file utils.cpp.

References xstring.

Referenced by drop_next_element(), operator>>(), reader_policy::by_default< qname_type, abs_reader_type >::read(), and read_stag().

XIMOL_EXPORT xistream& read_stag xistream xis,
xstring name,
xstring uri,
int  nb_read = 0
 

stag ::= '<' QName (S Attribute)* S? '>'

Definition at line 2606 of file utils.cpp.

References read_stag(), and xstring.

XIMOL_EXPORT xistream& read_stag xistream xis,
xstring name,
XIMOL_XML_NAMESPACE_PATH::attributes att,
int  nb_read = 0
 

stag ::= '<' QName (S Attribute)* S? '>'

Definition at line 2618 of file utils.cpp.

References read_stag(), and xstring.

XIMOL_EXPORT xistream& read_stag xistream xis,
xstring name,
XIMOL_XML_NAMESPACE_PATH::attributes att,
xstring uri,
int  nb_read = 0
 

stag ::= '<' QName (S Attribute)* S? '>'

Definition at line 2579 of file utils.cpp.

References clear_string(), xistream::context, read_open_stag(), and xstring.

XIMOL_EXPORT xistream& read_string_with_forbidden_serie xistream xis,
xstring xstr,
bool(*  is_good_xchar)(xchar_t),
const::std::string &  forbidden_string
 

ForbiddenSerie ::= SetByFunction - (SetByFunction forbidden_string SetByFunction) the reading is stop by the last char of the forbidden string and we putback only the last char of this forbidden string.

Definition at line 260 of file utils.cpp.

References clear_string(), xistream::get(), xistream::putback(), xchar_t, and xstring.

Referenced by is_string_with_forbidden_serie(), read_cdata(), read_char_data(), read_comment(), read_pi(), read_pubid_literal(), and read_system_literal().

XIMOL_EXPORT xistream& read_system_literal xistream xis,
xstring xstr
 

system_literal ::= ('"' [^"]* '"') | ("'" [^']* "'")
we use only the value without quote.

Definition at line 1237 of file utils.cpp.

References _(), clear_string(), is_char(), IsQuote(), read_string_with_forbidden_serie(), read_xchar(), XCHAR_APOSTROPHE, XCHAR_QUOTATION_MARK, xchar_t, and xstring.

Referenced by read_external_id(), and read_notation_decl().

XIMOL_EXPORT xistream& read_version_info xistream xis,
bool  read_first_space = true
 

VersionInfo ::= S 'version' Eq ("'" VersionNum "'" | '"' VersionNum '"')

Definition at line 1933 of file utils.cpp.

References xistream::context, and xstring.

Referenced by read_xml_decl().

XIMOL_EXPORT xistream& read_version_info xistream xis,
xstring xstr,
bool  read_first_space = true
 

VersionInfo ::= S 'version' Eq ("'" VersionNum "'" | '"' VersionNum '"')

Definition at line 1912 of file utils.cpp.

References _(), xistream::context, IsQuote(), read_eq(), read_space(), read_version_num(), read_xchar(), read_xstring(), xchar_t, and xstring.

XIMOL_EXPORT xistream& read_version_num xistream xis,
xstring xstr
 

VersionNum ::= ([a-zA-Z0-9_.:] | '-')+

Definition at line 1877 of file utils.cpp.

References _(), IsVersionNumChar(), read_xstring(), XIMOL_AS_ERROR, XIMOL_THROW, and xstring.

Referenced by read_version_info().

XIMOL_EXPORT xistream& read_xchar xistream xis,
xchar_t xc,
bool(*  is_good_xchar)(xchar_t),
const::std::wstring &  error_msg = L""
 

read Char defined by a function.

read a character defined by a function. This function test if the character is valid.

Parameters:
xis : the input stream
xc : the readed character in return
is_good_xchar : the test function that define a set of character
error_msg : the error message

Definition at line 163 of file utils.cpp.

References _(), xistream::get(), XIMOL_AS_ERROR, and XIMOL_THROW.

Referenced by read_att_list_decl(), read_att_value(), read_cd_end(), read_cd_start(), read_char_ref(), read_comment(), read_doctype_decl(), read_doctype_element(), read_element_decl(), read_enc_name(), read_encoding_decl(), read_entity_decl(), read_entity_ref(), read_entity_value(), read_eq(), read_etag(), read_external_id(), read_ge_decl(), read_name(), read_ncname(), read_ndata_decl(), read_nm_token(), read_notation_decl(), read_ns_att_name(), read_open_stag(), read_pe_decl(), read_pe_reference(), read_pi(), read_prolog_exclamation(), read_prolog_question(), read_pubid_literal(), read_reference(), read_sd_decl(), read_space(), read_system_literal(), read_version_info(), read_xml_decl(), and read_xstring().

XIMOL_EXPORT xistream& read_xchar xistream xis,
xchar_t  xc,
const::std::wstring &  error_msg = L""
 

read Special char.

read the first char from the stream and throw an error if this char is not xc

Parameters:
xis : the input stream
xc : the waited charater
error_msg : the error message

Definition at line 146 of file utils.cpp.

References _(), xistream::get(), xchar_t, XIMOL_AS_ERROR, and XIMOL_THROW.

XIMOL_EXPORT xistream& read_xml_decl xistream xis,
xstring version_info,
xstring encoding_decl,
bool &  standalone_decl,
int  nb_read = 0
 

XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'

Definition at line 2164 of file utils.cpp.

References _(), clear_string(), xistream::context, xistream::encoding(), IsCharESQ(), IsCharSQ(), xistream::putback(), read_encoding_decl(), read_optionnal_space(), read_sd_decl(), read_version_info(), read_xchar(), read_xstring(), XCHAR_LATIN_SMALL_LETTER_E, XCHAR_LATIN_SMALL_LETTER_L, XCHAR_LATIN_SMALL_LETTER_M, XCHAR_LATIN_SMALL_LETTER_S, XCHAR_LATIN_SMALL_LETTER_X, XCHAR_LESS_THAN_SIGN, XCHAR_QUESTION_MARK, xchar_t, and xstring.

Referenced by operator>>(), read_prolog_question(), and read_xml_decl().

XIMOL_EXPORT xistream & read_xml_decl xistream xis,
int  nb_read = 0
 

XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'

Definition at line 2219 of file utils.cpp.

References read_xml_decl(), and xstring.

XIMOL_EXPORT xistream& read_xstring xistream xistream_,
const::std::string &  str_,
const::std::wstring &  strErrorMsg_ = L"",
size_t  size_ = 0
 

read Special string.

read a constant string and verifie the exact math

Parameters:
xis : the input stream
xstr : the constant string to verifie
error_msg : the error message
nb_read : number of character already verifie.

Definition at line 212 of file utils.cpp.

References _(), and read_xchar().

Referenced by read_enc_name(), read_encoding_decl(), read_external_id(), read_name(), read_ncname(), read_nm_token(), read_notation_decl(), read_optionnal_space(), read_public_id(), read_sd_decl(), read_version_info(), read_version_num(), and read_xml_decl().

XIMOL_EXPORT xistream& read_xstring xistream xis,
xstring xstr,
bool(*  is_good_xchar)(xchar_t),
bool  erase_string = true
 

read string defined by a function.

read char x from input until is_good_xchar(x)==false

Parameters:
xis : the input stream
xstr : the readed string in return
is_good_xchar : the test function that define a set of character
erase_string : true if you want to erase the string before reading.

Definition at line 180 of file utils.cpp.

References clear_string(), xistream::front(), xistream::pop_front(), xchar_t, and xstring.

XIMOL_EXPORT xstring replace_char_ref const xstring xstr  ) 
 

CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'

Definition at line 1008 of file utils.cpp.

References read_char_ref(), XCHAR_AMPERSAND, xchar_t, and xstring.



Donate to the XiMoL project SourceForge.net Logo If you have any questions about XiMoL, you could write to tournois@users.sourceforge.net.