Module: FastXML
- Defined in:
- lib/fastxml.rb,
lib/fastxml/error.rb,
lib/fastxml/version.rb,
ext/fastxml/fastxml.c
Defined Under Namespace
Classes: ArgError, Error, ParseError
Constant Summary collapse
- VERSION =
"1.1.3"
Class Attribute Summary collapse
-
.attr ⇒ Object
Returns the value of attribute attr.
-
.buf_size ⇒ Object
Returns the value of attribute buf_size.
-
.canonical ⇒ Object
Returns the value of attribute canonical.
-
.cdata ⇒ Object
Returns the value of attribute cdata.
-
.comm ⇒ Object
Returns the value of attribute comm.
-
.content ⇒ Object
Returns the value of attribute content.
-
.doc ⇒ Object
Returns the value of attribute doc.
-
.encoding ⇒ Object
Returns the value of attribute encoding.
-
.force_array ⇒ Object
Returns the value of attribute force_array.
-
.force_content ⇒ Object
Returns the value of attribute force_content.
-
.indent ⇒ Object
Returns the value of attribute indent.
-
.keep_root ⇒ Object
Returns the value of attribute keep_root.
-
.max_depth ⇒ Object
Returns the value of attribute max_depth.
-
.merge_text ⇒ Object
Returns the value of attribute merge_text.
-
.method ⇒ Object
Returns the value of attribute method.
-
.output ⇒ Object
Returns the value of attribute output.
-
.root ⇒ Object
Returns the value of attribute root.
-
.text ⇒ Object
Returns the value of attribute text.
-
.trim ⇒ Object
Returns the value of attribute trim.
-
.use_attr ⇒ Object
Returns the value of attribute use_attr.
-
.utf8 ⇒ Object
Returns the value of attribute utf8.
-
.version ⇒ Object
Returns the value of attribute version.
-
.xml_decl ⇒ Object
Returns the value of attribute xml_decl.
Class Method Summary collapse
Class Attribute Details
.attr ⇒ Object
Returns the value of attribute attr.
7 8 9 |
# File 'lib/fastxml.rb', line 7 def attr @attr end |
.buf_size ⇒ Object
Returns the value of attribute buf_size.
7 8 9 |
# File 'lib/fastxml.rb', line 7 def buf_size @buf_size end |
.canonical ⇒ Object
Returns the value of attribute canonical.
7 8 9 |
# File 'lib/fastxml.rb', line 7 def canonical @canonical end |
.cdata ⇒ Object
Returns the value of attribute cdata.
7 8 9 |
# File 'lib/fastxml.rb', line 7 def cdata @cdata end |
.comm ⇒ Object
Returns the value of attribute comm.
7 8 9 |
# File 'lib/fastxml.rb', line 7 def comm @comm end |
.content ⇒ Object
Returns the value of attribute content.
7 8 9 |
# File 'lib/fastxml.rb', line 7 def content @content end |
.doc ⇒ Object
Returns the value of attribute doc.
7 8 9 |
# File 'lib/fastxml.rb', line 7 def doc @doc end |
.encoding ⇒ Object
Returns the value of attribute encoding.
7 8 9 |
# File 'lib/fastxml.rb', line 7 def encoding @encoding end |
.force_array ⇒ Object
Returns the value of attribute force_array.
7 8 9 |
# File 'lib/fastxml.rb', line 7 def force_array @force_array end |
.force_content ⇒ Object
Returns the value of attribute force_content.
7 8 9 |
# File 'lib/fastxml.rb', line 7 def force_content @force_content end |
.indent ⇒ Object
Returns the value of attribute indent.
7 8 9 |
# File 'lib/fastxml.rb', line 7 def indent @indent end |
.keep_root ⇒ Object
Returns the value of attribute keep_root.
7 8 9 |
# File 'lib/fastxml.rb', line 7 def keep_root @keep_root end |
.max_depth ⇒ Object
Returns the value of attribute max_depth.
7 8 9 |
# File 'lib/fastxml.rb', line 7 def max_depth @max_depth end |
.merge_text ⇒ Object
Returns the value of attribute merge_text.
7 8 9 |
# File 'lib/fastxml.rb', line 7 def merge_text @merge_text end |
.method ⇒ Object
Returns the value of attribute method.
7 8 9 |
# File 'lib/fastxml.rb', line 7 def method @method end |
.output ⇒ Object
Returns the value of attribute output.
7 8 9 |
# File 'lib/fastxml.rb', line 7 def output @output end |
.root ⇒ Object
Returns the value of attribute root.
7 8 9 |
# File 'lib/fastxml.rb', line 7 def root @root end |
.text ⇒ Object
Returns the value of attribute text.
7 8 9 |
# File 'lib/fastxml.rb', line 7 def text @text end |
.trim ⇒ Object
Returns the value of attribute trim.
7 8 9 |
# File 'lib/fastxml.rb', line 7 def trim @trim end |
.use_attr ⇒ Object
Returns the value of attribute use_attr.
7 8 9 |
# File 'lib/fastxml.rb', line 7 def use_attr @use_attr end |
.utf8 ⇒ Object
Returns the value of attribute utf8.
7 8 9 |
# File 'lib/fastxml.rb', line 7 def utf8 @utf8 end |
.version ⇒ Object
Returns the value of attribute version.
7 8 9 |
# File 'lib/fastxml.rb', line 7 def version @version end |
.xml_decl ⇒ Object
Returns the value of attribute xml_decl.
7 8 9 |
# File 'lib/fastxml.rb', line 7 def xml_decl @xml_decl end |
Class Method Details
.configure {|_self| ... } ⇒ Object
32 33 34 |
# File 'lib/fastxml.rb', line 32 def self.configure yield(self) end |
.hash2xml(*args) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'ext/fastxml/fastxml.c', line 34
static VALUE
hash2xml(int argc, VALUE *argv, VALUE self) {
xh_h2x_ctx_t ctx;
VALUE result;
int state;
xh_h2x_arg_t arg;
arg.argc = argc;
arg.argv = argv;
arg.ctx = &ctx;
result = rb_protect(hash2xml_exec, (VALUE) &arg, &state);
if (state) {
xh_h2x_destroy_ctx(&ctx);
rb_exc_raise(rb_errinfo());
}
if (ctx.opts.output != Qnil) result = Qnil;
xh_h2x_destroy_ctx(&ctx);
return result;
}
|
.xml2hash(*args) ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'ext/fastxml/fastxml.c', line 68
static VALUE
xml2hash(int argc, VALUE *argv, VALUE self) {
xh_x2h_ctx_t ctx;
VALUE result;
int state;
xh_x2h_arg_t arg;
arg.argc = argc;
arg.argv = argv;
arg.ctx = &ctx;
result = rb_protect(xml2hash_exec, (VALUE) &arg, &state);
if (state) {
xh_x2h_destroy_ctx(&ctx);
rb_exc_raise(rb_errinfo());
}
xh_x2h_destroy_ctx(&ctx);
return result;
}
|