Class: Meteor::Core::Xml::ParserImpl
- Defined in:
- lib/meteor.rb
Overview
XMLパーサ
Constant Summary collapse
- PATTERN_UNESCAPE =
'&(amp|quot|apos|gt|lt);'
- TABLE_FOR_ESCAPE_ =
{ '&' => '&', '"' => '"', '\'' => ''', '<' => '<', '>' => '>', }
- PATTERN_ESCAPE =
'[&\"\'<>]'
- @@pattern_escape =
Regexp.new(PATTERN_ESCAPE)
- @@pattern_unescape =
Regexp.new(PATTERN_UNESCAPE)
- @@pattern_set_mono1 =
Regexp.new(SET_MONO_1)
- @@pattern_and_1 =
Regexp.new(AND_1)
- @@pattern_lt_1 =
Regexp.new(LT_1)
- @@pattern_gt_1 =
Regexp.new(GT_1)
- @@pattern_dq_1 =
Regexp.new(DOUBLE_QUATATION)
- @@pattern_ap_1 =
Regexp.new(AP_1)
- @@pattern_lt_2 =
Regexp.new(LT_2)
- @@pattern_gt_2 =
Regexp.new(GT_2)
- @@pattern_dq_2 =
Regexp.new(QO_2)
- @@pattern_ap_2 =
Regexp.new(AP_2)
- @@pattern_and_2 =
Regexp.new(AND_2)
Constants inherited from Kernel
Kernel::AND_1, Kernel::AND_2, Kernel::AND_3, Kernel::AP_1, Kernel::AP_2, Kernel::AP_3, Kernel::ATTR_EQ, Kernel::CLEAN_1, Kernel::CLEAN_2, Kernel::DOUBLE_QUATATION, Kernel::EMPTY, Kernel::EN_1, Kernel::ERASE_ATTR_1, Kernel::ESCAPE_ENTITY_REF, Kernel::GET_ATTRS_MAP, Kernel::GET_ATTR_1, Kernel::GT_1, Kernel::GT_2, Kernel::GT_3, Kernel::LT_1, Kernel::LT_2, Kernel::LT_3, Kernel::MODE, Kernel::MODE_AF, Kernel::MODE_BF, Kernel::MODE_UTF8, Kernel::QO_2, Kernel::QO_3, Kernel::SEARCH_CX_1, Kernel::SEARCH_CX_2, Kernel::SEARCH_CX_3, Kernel::SEARCH_CX_4, Kernel::SEARCH_CX_5, Kernel::SEARCH_CX_6, Kernel::SET_ATTR_1, Kernel::SET_CX_1, Kernel::SET_CX_2, Kernel::SET_CX_3, Kernel::SET_CX_4, Kernel::SET_MONO_1, Kernel::SPACE, Kernel::TAG_CLOSE, Kernel::TAG_CLOSE3, Kernel::TAG_OPEN, Kernel::TAG_OPEN3, Kernel::TAG_SEARCH_1_1, Kernel::TAG_SEARCH_1_2, Kernel::TAG_SEARCH_1_3, Kernel::TAG_SEARCH_1_4, Kernel::TAG_SEARCH_1_4_2, Kernel::TAG_SEARCH_2_1, Kernel::TAG_SEARCH_2_1_2, Kernel::TAG_SEARCH_2_2, Kernel::TAG_SEARCH_2_2_2, Kernel::TAG_SEARCH_2_3, Kernel::TAG_SEARCH_2_3_2, Kernel::TAG_SEARCH_2_3_2_2, Kernel::TAG_SEARCH_2_4, Kernel::TAG_SEARCH_2_4_2, Kernel::TAG_SEARCH_2_4_2_2, Kernel::TAG_SEARCH_2_4_2_3, Kernel::TAG_SEARCH_2_4_3, Kernel::TAG_SEARCH_2_4_3_2, Kernel::TAG_SEARCH_2_4_4, Kernel::TAG_SEARCH_2_6, Kernel::TAG_SEARCH_2_7, Kernel::TAG_SEARCH_3_1, Kernel::TAG_SEARCH_3_1_2, Kernel::TAG_SEARCH_3_1_2_2, Kernel::TAG_SEARCH_3_2, Kernel::TAG_SEARCH_3_2_2, Kernel::TAG_SEARCH_3_2_2_2, Kernel::TAG_SEARCH_4_1, Kernel::TAG_SEARCH_4_2, Kernel::TAG_SEARCH_4_3, Kernel::TAG_SEARCH_4_4, Kernel::TAG_SEARCH_4_5, Kernel::TAG_SEARCH_4_6, Kernel::TAG_SEARCH_4_7, Kernel::TAG_SEARCH_4_7_2, Kernel::TAG_SEARCH_NC_1_1, Kernel::TAG_SEARCH_NC_1_2, Kernel::TAG_SEARCH_NC_1_3, Kernel::TAG_SEARCH_NC_1_4, Kernel::TAG_SEARCH_NC_1_4_2, Kernel::TAG_SEARCH_NC_2_1, Kernel::TAG_SEARCH_NC_2_1_2, Kernel::TAG_SEARCH_NC_2_2, Kernel::TAG_SEARCH_NC_2_2_2, Kernel::TAG_SEARCH_NC_2_3, Kernel::TAG_SEARCH_NC_2_3_2, Kernel::TAG_SEARCH_NC_2_3_2_2, Kernel::TAG_SEARCH_NC_2_4, Kernel::TAG_SEARCH_NC_2_4_2, Kernel::TAG_SEARCH_NC_2_4_2_2, Kernel::TAG_SEARCH_NC_2_4_2_3, Kernel::TAG_SEARCH_NC_2_4_3, Kernel::TAG_SEARCH_NC_2_4_3_2, Kernel::TAG_SEARCH_NC_2_4_4, Kernel::TAG_SEARCH_NC_2_6, Kernel::TAG_SEARCH_NC_2_7, Kernel::TAG_SEARCH_NC_3_1, Kernel::TAG_SEARCH_NC_3_1_2, Kernel::TAG_SEARCH_NC_3_1_2_2, Kernel::TAG_SEARCH_NC_3_2, Kernel::TAG_SEARCH_NC_3_2_2, Kernel::TAG_SEARCH_NC_3_2_2_2
Constants inherited from Parser
Parser::HTML, Parser::XHTML, Parser::XML
Instance Attribute Summary
Attributes inherited from Kernel
Instance Method Summary collapse
-
#content_type ⇒ Streing
コンテントタイプを取得する.
-
#initialize(*args) ⇒ ParserImpl
constructor
イニシャライザ.
-
#parse(document) ⇒ Object
ドキュメントをパーサにセットする.
-
#read(file_path, encoding) ⇒ Object
ファイルを読み込み、パーサにセットする.
Methods inherited from Kernel
#attribute, #attribute_map, #character_encoding, #character_encoding=, #content, #cxtag, #document, #document=, #element, #execute, #flush, #remove_element, #root_element
Constructor Details
#initialize ⇒ ParserImpl #initialize(ps) ⇒ ParserImpl
イニシャライザ
4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 |
# File 'lib/meteor.rb', line 4451 def initialize(*args) super() @doc_type = Parser::XML case args.length when ZERO initialize_0 when ONE initialize_1(args[0]) else raise ArgumentError end end |
Instance Method Details
#content_type ⇒ Streing
コンテントタイプを取得する
4501 4502 4503 |
# File 'lib/meteor.rb', line 4501 def content_type() @root.content_type end |
#parse(document) ⇒ Object
ドキュメントをパーサにセットする
4485 4486 4487 |
# File 'lib/meteor.rb', line 4485 def parse(document) @root.document = document end |
#read(file_path, encoding) ⇒ Object
ファイルを読み込み、パーサにセットする
4494 4495 4496 |
# File 'lib/meteor.rb', line 4494 def read(file_path,encoding) super(file_path, encoding) end |