summaryrefslogtreecommitdiff
path: root/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc')
-rw-r--r--vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/context.rdoc143
-rw-r--r--vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/child.rdoc87
-rw-r--r--vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/document.rdoc276
-rw-r--r--vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/element.rdoc602
-rw-r--r--vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/node.rdoc97
-rw-r--r--vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/parent.rdoc267
-rw-r--r--vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/child_toc.rdoc12
-rw-r--r--vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/document_toc.rdoc30
-rw-r--r--vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/element_toc.rdoc55
-rw-r--r--vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/master_toc.rdoc135
-rw-r--r--vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/node_toc.rdoc16
-rw-r--r--vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/parent_toc.rdoc25
-rw-r--r--vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tutorial.rdoc1358
13 files changed, 3103 insertions, 0 deletions
diff --git a/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/context.rdoc b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/context.rdoc
new file mode 100644
index 0000000..7ef01f7
--- /dev/null
+++ b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/context.rdoc
@@ -0,0 +1,143 @@
+== Element Context
+
+Notes:
+- All code on this page presupposes that the following has been executed:
+
+ require 'rexml/document'
+
+- For convenience, examples on this page use +REXML::Document.new+, not +REXML::Element.new+.
+ This is completely valid, because REXML::Document is a subclass of REXML::Element.
+
+The context for an element is a hash of processing directives
+that influence the way \XML is read, stored, and written.
+The context entries are:
+
+- +:respect_whitespace+: controls treatment of whitespace.
+- +:compress_whitespace+: determines whether whitespace is compressed.
+- +:ignore_whitespace_nodes+: determines whether whitespace-only nodes are to be ignored.
+- +:raw+: controls treatment of special characters and entities.
+
+The default context for a new element is <tt>{}</tt>.
+You can set the context at element-creation time:
+
+ d = REXML::Document.new('', {compress_whitespace: :all, raw: :all})
+ d.context # => {:compress_whitespace=>:all, :raw=>:all}
+
+You can reset the entire context by assigning a new hash:
+
+ d.context = {ignore_whitespace_nodes: :all}
+ d.context # => {:ignore_whitespace_nodes=>:all}
+
+Or you can create or modify an individual entry:
+
+ d.context[:raw] = :all
+ d.context # => {:ignore_whitespace_nodes=>:all, :raw=>:all}
+
+=== +:respect_whitespace+
+
+Affects: +REXML::Element.new+, +REXML::Element.text=+.
+
+By default, all parsed whitespace is respected (that is, stored whitespace not compressed):
+
+ xml_string = '<root><foo>a b</foo> <bar>c d</bar> <baz>e f</baz></root>'
+ d = REXML::Document.new(xml_string)
+ d.to_s # => "<root><foo>a b</foo> <bar>c d</bar> <baz>e f</baz></root>"
+
+Use +:respect_whitespace+ with an array of element names
+to specify the elements that _are_ to have their whitespace respected;
+other elements' whitespace, and whitespace between elements, will be compressed.
+
+In this example: +foo+ and +baz+ will have their whitespace respected;
++bar+ and the space between elements will have their whitespace compressed:
+
+ d = REXML::Document.new(xml_string, {respect_whitespace: ['foo', 'baz']})
+ d.to_s # => "<root><foo>a b</foo> <bar>c d</bar> <baz>e f</baz></root>"
+ bar = d.root[2] # => <bar> ... </>
+ bar.text = 'X Y'
+ d.to_s # => "<root><foo>a b</foo> <bar>X Y</bar> <baz>e f</baz></root>"
+
+=== +:compress_whitespace+
+
+Affects: +REXML::Element.new+, +REXML::Element.text=+.
+
+Use <tt>compress_whitespace: :all</tt>
+to compress whitespace both within and between elements:
+
+ xml_string = '<root><foo>a b</foo> <bar>c d</bar> <baz>e f</baz></root>'
+ d = REXML::Document.new(xml_string, {compress_whitespace: :all})
+ d.to_s # => "<root><foo>a b</foo> <bar>c d</bar> <baz>e f</baz></root>"
+
+Use +:compress_whitespace+ with an array of element names
+to compress whitespace in those elements,
+but not in other elements nor between elements.
+
+In this example, +foo+ and +baz+ will have their whitespace compressed;
++bar+ and the space between elements will not:
+
+ d = REXML::Document.new(xml_string, {compress_whitespace: ['foo', 'baz']})
+ d.to_s # => "<root><foo>a b</foo> <bar>c d</bar> <baz>e f</baz></root>"
+ foo = d.root[0] # => <foo> ... </>
+ foo.text= 'X Y'
+ d.to_s # => "<root><foo>X Y</foo> <bar>c d</bar> <baz>e f</baz></root>"
+
+=== +:ignore_whitespace_nodes+
+
+Affects: +REXML::Element.new+.
+
+Use <tt>ignore_whitespace_nodes: :all</tt> to omit all whitespace-only elements.
+
+In this example, +bar+ has a text node, while nodes +foo+ and +baz+ do not:
+
+ xml_string = '<root><foo> </foo><bar> BAR </bar><baz> </baz></root>'
+ d = REXML::Document.new(xml_string, {ignore_whitespace_nodes: :all})
+ d.to_s # => "<root><foo> FOO </foo><bar/><baz> BAZ </baz></root>"
+ root = d.root # => <root> ... </>
+ foo = root[0] # => <foo/>
+ bar = root[1] # => <bar> ... </>
+ baz = root[2] # => <baz/>
+ foo.first.class # => NilClass
+ bar.first.class # => REXML::Text
+ baz.first.class # => NilClass
+
+Use +:ignore_whitespace_nodes+ with an array of element names
+to specify the elements that are to have whitespace nodes ignored.
+
+In this example, +bar+ and +baz+ have text nodes, while node +foo+ does not.
+
+ xml_string = '<root><foo> </foo><bar> BAR </bar><baz> </baz></root>'
+ d = REXML::Document.new(xml_string, {ignore_whitespace_nodes: ['foo']})
+ d.to_s # => "<root><foo/><bar> BAR </bar><baz> </baz></root>"
+ root = d.root # => <root> ... </>
+ foo = root[0] # => <foo/>
+ bar = root[1] # => <bar> ... </>
+ baz = root[2] # => <baz> ... </>
+ foo.first.class # => NilClass
+ bar.first.class # => REXML::Text
+ baz.first.class # => REXML::Text
+
+=== +:raw+
+
+Affects: +Element.text=+, +Element.add_text+, +Text.to_s+.
+
+Parsing of +a+ elements is not affected by +raw+:
+
+ xml_string = '<root><a>0 &lt; 1</a><b>1 &gt; 0</b></root>'
+ d = REXML::Document.new(xml_string, {:raw => ['a']})
+ d.root.to_s # => "<root><a>0 &lt; 1</a><b>1 &gt; 0</b></root>"
+ a, b = *d.root.elements
+ a.to_s # => "<a>0 &lt; 1</a>"
+ b.to_s # => "<b>1 &gt; 0</b>"
+
+But Element#text= is affected:
+
+ a.text = '0 &lt; 1'
+ b.text = '1 &gt; 0'
+ a.to_s # => "<a>0 &lt; 1</a>"
+ b.to_s # => "<b>1 &amp;gt; 0</b>"
+
+As is Element.add_text:
+
+ a.add_text(' so 1 &gt; 0')
+ b.add_text(' so 0 &lt; 1')
+ a.to_s # => "<a>0 &lt; 1 so 1 &gt; 0</a>"
+ b.to_s # => "<b>1 &amp;gt; 0 so 0 &amp;lt; 1</b>"
diff --git a/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/child.rdoc b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/child.rdoc
new file mode 100644
index 0000000..8953638
--- /dev/null
+++ b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/child.rdoc
@@ -0,0 +1,87 @@
+== Class Child
+
+Class Child includes module Node;
+see {Tasks for Node}[node_rdoc.html].
+
+:include: ../tocs/child_toc.rdoc
+
+=== Relationships
+
+==== Task: Set the Parent
+
+Use method {Child#parent=}[../../../../REXML/Parent.html#method-i-parent-3D]
+to set the parent:
+
+ e0 = REXML::Element.new('foo')
+ e1 = REXML::Element.new('bar')
+ e1.parent # => nil
+ e1.parent = e0
+ e1.parent # => <foo/>
+
+==== Task: Insert Previous Sibling
+
+Use method {Child#previous_sibling=}[../../../../REXML/Parent.html#method-i-previous_sibling-3D]
+to insert a previous sibling:
+
+ xml_string = '<root><a/><c/></root>'
+ d = REXML::Document.new(xml_string)
+ d.root.to_a # => [<a/>, <c/>]
+ c = d.root[1] # => <c/>
+ b = REXML::Element.new('b')
+ c.previous_sibling = b
+ d.root.to_a # => [<a/>, <b/>, <c/>]
+
+==== Task: Insert Next Sibling
+
+Use method {Child#next_sibling=}[../../../../REXML/Parent.html#method-i-next-sibling-3D]
+to insert a previous sibling:
+
+ xml_string = '<root><a/><c/></root>'
+ d = REXML::Document.new(xml_string)
+ d.root.to_a # => [<a/>, <c/>]
+ a = d.root[0] # => <a/>
+ b = REXML::Element.new('b')
+ a.next_sibling = b
+ d.root.to_a # => [<a/>, <b/>, <c/>]
+
+=== Removal or Replacement
+
+==== Task: Remove Child from Parent
+
+Use method {Child#remove}[../../../../REXML/Parent.html#method-i-remove]
+to remove a child from its parent; returns the removed child:
+
+ xml_string = '<root><a/><b/><c/></root>'
+ d = REXML::Document.new(xml_string)
+ d.root.to_a # => [<a/>, <b/>, <c/>]
+ b = d.root[1] # => <b/>
+ b.remove # => <b/>
+ d.root.to_a # => [<a/>, <c/>]
+
+==== Task: Replace Child
+
+Use method {Child#replace_with}[../../../../REXML/Parent.html#method-i-replace]
+to replace a child;
+returns the replaced child:
+
+ xml_string = '<root><a/><b/><c/></root>'
+ d = REXML::Document.new(xml_string)
+ d.root.to_a # => [<a/>, <b/>, <c/>]
+ b = d.root[1] # => <b/>
+ d = REXML::Element.new('d')
+ b.replace_with(d) # => <b/>
+ d.root.to_a # => [<a/>, <d/>, <c/>]
+
+=== Document
+
+==== Task: Get the Document
+
+Use method {Child#document}[../../../../REXML/Parent.html#method-i-document]
+to get the document for the child:
+
+ xml_string = '<root><a/><b/><c/></root>'
+ d = REXML::Document.new(xml_string)
+ d.root.to_a # => [<a/>, <b/>, <c/>]
+ b = d.root[1] # => <b/>
+ b.document == d # => true
+ REXML::Child.new.document # => nil
diff --git a/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/document.rdoc b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/document.rdoc
new file mode 100644
index 0000000..96d0335
--- /dev/null
+++ b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/document.rdoc
@@ -0,0 +1,276 @@
+== Class Document
+
+Class Document has methods from its superclasses and included modules;
+see:
+
+- {Tasks for Element}[element_rdoc.html].
+- {Tasks for Parent}[parent_rdoc.html].
+- {Tasks for Child}[child_rdoc.html].
+- {Tasks for Node}[node_rdoc.html].
+- {Module Enumerable}[https://docs.ruby-lang.org/en/master/Enumerable.html].
+
+:include: ../tocs/document_toc.rdoc
+
+=== New Document
+
+==== Task: Create an Empty Document
+
+Use method {Document::new}[../../../../REXML/Document.html#method-c-new]
+to create an empty document.
+
+ d = REXML::Document.new
+
+==== Task: Parse a \String into a New Document
+
+Use method {Document::new}[../../../../REXML/Document.html#method-c-new]
+to parse an XML string into a new document:
+
+ xml_string = '<root><a/>text<b/>more<c/></root>'
+ d = REXML::Document.new(xml_string)
+ d.root # => <root> ... </>
+
+==== Task: Parse an \IO Stream into a New Document
+
+Use method {Document::new}[../../../../REXML/Document.html#method-c-new]
+to parse an XML \IO stream into a new document:
+
+ xml_string = '<root><a/>text<b/>more<c/></root>'
+ File.write('t.xml', xml_string)
+ d = File.open('t.xml', 'r') do |file|
+ REXML::Document.new(file)
+ end
+ d.root # => <root> ... </>
+
+==== Task: Create a Document from an Existing Document
+
+Use method {Document::new}[../../../../REXML/Document.html#method-c-new]
+to create a document from an existing document.
+The context and attributes are copied to the new document,
+but not the children:
+
+ xml_string = '<root><a/>text<b/>more<c/></root>'
+ d = REXML::Document.new(xml_string)
+ d.children # => [<root> ... </>]
+ d.context = {raw: :all, compress_whitespace: :all}
+ d.add_attributes({'bar' => 0, 'baz' => 1})
+ d1 = REXML::Document.new(d)
+ d1.context # => {:raw=>:all, :compress_whitespace=>:all}
+ d1.attributes # => {"bar"=>bar='0', "baz"=>baz='1'}
+ d1.children # => []
+
+==== Task: Clone a Document
+
+Use method {Document#clone}[../../../../REXML/Document.html#method-i-clone]
+to clone a document.
+The context and attributes are copied to the new document,
+but not the children:
+
+ xml_string = '<root><a/>text<b/>more<c/></root>'
+ d = REXML::Document.new(xml_string)
+ d.children # => [<root> ... </>]
+ d.context = {raw: :all, compress_whitespace: :all}
+ d.add_attributes({'bar' => 0, 'baz' => 1})
+ d1 = d.clone # => < bar='0' baz='1'/>
+ d1.context # => {:raw=>:all, :compress_whitespace=>:all}
+ d1.attributes # => {"bar"=>bar='0', "baz"=>baz='1'}
+ d1.children # => []
+
+=== Document Type
+
+==== Task: Get the Document Type
+
+Use method {Document#doctype}[../../../../REXML/Document.html#method-i-doctype]
+to get the document type:
+
+ d = REXML::Document.new('<!DOCTYPE document SYSTEM "subjects.dtd">')
+ d.doctype.class # => REXML::DocType
+ d = REXML::Document.new('')
+ d.doctype.class # => nil
+
+==== Task: Set the Document Type
+
+Use method {document#add}[../../../../REXML/Document.html#method-i-add]
+to add or replace the document type:
+
+ d = REXML::Document.new('')
+ d.doctype.class # => nil
+ d.add(REXML::DocType.new('foo'))
+ d.doctype.class # => REXML::DocType
+
+=== XML Declaration
+
+==== Task: Get the XML Declaration
+
+Use method {document#xml_decl}[../../../../REXML/Document.html#method-i-xml_decl]
+to get the XML declaration:
+
+ d = REXML::Document.new('<!DOCTYPE document SYSTEM "subjects.dtd">')
+ d.xml_decl.class # => REXML::XMLDecl
+ d.xml_decl # => <?xml ... ?>
+ d = REXML::Document.new('')
+ d.xml_decl.class # => REXML::XMLDecl
+ d.xml_decl # => <?xml ... ?>
+
+==== Task: Set the XML Declaration
+
+Use method {document#add}[../../../../REXML/Document.html#method-i-add]
+to replace the XML declaration:
+
+ d = REXML::Document.new('<!DOCTYPE document SYSTEM "subjects.dtd">')
+ d.add(REXML::XMLDecl.new)
+
+=== Children
+
+==== Task: Add an Element Child
+
+Use method
+{document#add_element}[../../../../REXML/Document.html#method-i-add_element]
+to add an element to the document:
+
+ d = REXML::Document.new('')
+ d.add_element(REXML::Element.new('root'))
+ d.children # => [<root/>]
+
+==== Task: Add a Non-Element Child
+
+Use method
+{document#add}[../../../../REXML/Document.html#method-i-add]
+to add a non-element to the document:
+
+ xml_string = '<root><a/>text<b/>more<c/></root>'
+ d = REXML::Document.new(xml_string)
+ d.add(REXML::Text.new('foo'))
+ d.children # => [<root> ... </>, "foo"]
+
+=== Writing
+
+==== Task: Write to $stdout
+
+Use method
+{document#write}[../../../../REXML/Document.html#method-i-write]
+to write the document to <tt>$stdout</tt>:
+
+ xml_string = '<root><a/>text<b/>more<c/></root>'
+ d = REXML::Document.new(xml_string)
+ d.write
+
+Output:
+
+ <root><a/>text<b/>more<c/></root>
+
+==== Task: Write to IO Stream
+
+Use method
+{document#write}[../../../../REXML/Document.html#method-i-write]
+to write the document to <tt>$stdout</tt>:
+
+ xml_string = '<root><a/>text<b/>more<c/></root>'
+ d = REXML::Document.new(xml_string)
+ File.open('t.xml', 'w') do |file|
+ d.write(file)
+ end
+ p File.read('t.xml')
+
+Output:
+
+ "<root><a/>text<b/>more<c/></root>"
+
+==== Task: Write with No Indentation
+
+Use method
+{document#write}[../../../../REXML/Document.html#method-i-write]
+to write the document with no indentation:
+
+ xml_string = '<root><a><b><c></c></b></a></root>'
+ d = REXML::Document.new(xml_string)
+ d.write({indent: 0})
+
+Output:
+
+ <root>
+ <a>
+ <b>
+ <c/>
+ </b>
+ </a>
+ </root>
+
+==== Task: Write with Specified Indentation
+
+Use method
+{document#write}[../../../../REXML/Document.html#method-i-write]
+to write the document with a specified indentation:
+
+ xml_string = '<root><a><b><c></c></b></a></root>'
+ d = REXML::Document.new(xml_string)
+ d.write({indent: 2})
+
+Output:
+
+ <root>
+ <a>
+ <b>
+ <c/>
+ </b>
+ </a>
+ </root>
+
+=== Querying
+
+==== Task: Get the Document
+
+Use method
+{document#document}[../../../../REXML/Document.html#method-i-document]
+to get the document (+self+); overrides <tt>Element#document</tt>:
+
+ xml_string = '<root><a><b><c></c></b></a></root>'
+ d = REXML::Document.new(xml_string)
+ d.document == d # => true
+
+==== Task: Get the Encoding
+
+Use method
+{document#document}[../../../../REXML/Document.html#method-i-document]
+to get the document (+self+); overrides <tt>Element#document</tt>:
+
+ xml_string = '<root><a><b><c></c></b></a></root>'
+ d = REXML::Document.new(xml_string)
+ d.encoding # => "UTF-8"
+
+==== Task: Get the Node Type
+
+Use method
+{document#node_type}[../../../../REXML/Document.html#method-i-node_type]
+to get the node type (+:document+); overrides <tt>Element#node_type</tt>:
+
+ xml_string = '<root><a><b><c></c></b></a></root>'
+ d = REXML::Document.new(xml_string)
+ d.node_type # => :document
+
+==== Task: Get the Root Element
+
+Use method
+{document#root}[../../../../REXML/Document.html#method-i-root]
+to get the root element:
+
+ xml_string = '<root><a><b><c></c></b></a></root>'
+ d = REXML::Document.new(xml_string)
+ d.root # => <root> ... </>
+
+==== Task: Determine Whether Stand-Alone
+
+Use method
+{document#stand_alone?}[../../../../REXML/Document.html#method-i-stand_alone-3F]
+to get the stand-alone value:
+
+ d = REXML::Document.new('<?xml standalone="yes"?>')
+ d.stand_alone? # => "yes"
+
+==== Task: Get the Version
+
+Use method
+{document#version}[../../../../REXML/Document.html#method-i-version]
+to get the version:
+
+ d = REXML::Document.new('<?xml version="2.0" encoding="UTF-8"?>')
+ d.version # => "2.0"
diff --git a/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/element.rdoc b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/element.rdoc
new file mode 100644
index 0000000..4b3609b
--- /dev/null
+++ b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/element.rdoc
@@ -0,0 +1,602 @@
+== Class Element
+
+Class Element has methods from its superclasses and included modules;
+see:
+
+- {Tasks for Parent}[parent_rdoc.html].
+- {Tasks for Child}[child_rdoc.html].
+- {Tasks for Node}[node_rdoc.html].
+- {Module Enumerable}[https://docs.ruby-lang.org/en/master/Enumerable.html].
+
+:include: ../tocs/element_toc.rdoc
+
+=== New Element
+
+==== Task: Create a Default Element
+
+Use method
+{Element::new}[../../../../REXML/Element.html#method-c-new]
+with no arguments to create a default element:
+
+ e = REXML::Element.new
+ e.name # => "UNDEFINED"
+ e.parent # => nil
+ e.context # => nil
+
+==== Task: Create a Named Element
+
+Use method
+{Element::new}[../../../../REXML/Element.html#method-c-new]
+with a string name argument
+to create a named element:
+
+ e = REXML::Element.new('foo')
+ e.name # => "foo"
+ e.parent # => nil
+ e.context # => nil
+
+==== Task: Create an Element with Name and Parent
+
+Use method
+{Element::new}[../../../../REXML/Element.html#method-c-new]
+with name and parent arguments
+to create an element with name and parent:
+
+ p = REXML::Parent.new
+ e = REXML::Element.new('foo', p)
+ e.name # => "foo"
+ e.parent # => #<REXML::Parent @parent=nil, @children=[<foo/>]>
+ e.context # => nil
+
+==== Task: Create an Element with Name, Parent, and Context
+
+Use method
+{Element::new}[../../../../REXML/Element.html#method-c-new]
+with name, parent, and context arguments
+to create an element with name, parent, and context:
+
+ p = REXML::Parent.new
+ e = REXML::Element.new('foo', p, {compress_whitespace: :all})
+ e.name # => "foo"
+ e.parent # => #<REXML::Parent @parent=nil, @children=[<foo/>]>
+ e.context # => {:compress_whitespace=>:all}
+
+==== Task: Create a Shallow Clone
+
+Use method
+{Element#clone}[../../../../REXML/Element.html#method-i-clone]
+to create a shallow clone of an element,
+copying only the name, attributes, and context:
+
+ e0 = REXML::Element.new('foo', nil, {compress_whitespace: :all})
+ e0.add_attribute(REXML::Attribute.new('bar', 'baz'))
+ e0.context = {compress_whitespace: :all}
+ e1 = e0.clone # => <foo bar='baz'/>
+ e1.name # => "foo"
+ e1.context # => {:compress_whitespace=>:all}
+
+=== Attributes
+
+==== Task: Create and Add an Attribute
+
+Use method
+{Element#add_attribute}[../../../../REXML/Element.html#method-i-add_attribute]
+to create and add an attribute:
+
+ e = REXML::Element.new
+ e.add_attribute('attr', 'value') # => "value"
+ e['attr'] # => "value"
+ e.add_attribute('attr', 'VALUE') # => "VALUE"
+ e['attr'] # => "VALUE"
+
+==== Task: Add an Existing Attribute
+
+Use method
+{Element#add_attribute}[../../../../REXML/Element.html#method-i-add_attribute]
+to add an existing attribute:
+
+ e = REXML::Element.new
+ a = REXML::Attribute.new('attr', 'value')
+ e.add_attribute(a)
+ e['attr'] # => "value"
+ a = REXML::Attribute.new('attr', 'VALUE')
+ e.add_attribute(a)
+ e['attr'] # => "VALUE"
+
+==== Task: Add Multiple Attributes from a Hash
+
+Use method
+{Element#add_attributes}[../../../../REXML/Element.html#method-i-add_attributes]
+to add multiple attributes from a hash:
+
+ e = REXML::Element.new
+ h = {'foo' => 0, 'bar' => 1}
+ e.add_attributes(h)
+ e['foo'] # => "0"
+ e['bar'] # => "1"
+
+==== Task: Add Multiple Attributes from an Array
+
+Use method
+{Element#add_attributes}[../../../../REXML/Element.html#method-i-add_attributes]
+to add multiple attributes from an array:
+
+ e = REXML::Element.new
+ a = [['foo', 0], ['bar', 1]]
+ e.add_attributes(a)
+ e['foo'] # => "0"
+ e['bar'] # => "1"
+
+==== Task: Retrieve the Value for an Attribute Name
+
+Use method
+{Element#[]}[../../../../REXML/Element.html#method-i-5B-5D]
+to retrieve the value for an attribute name:
+
+ e = REXML::Element.new
+ e.add_attribute('attr', 'value') # => "value"
+ e['attr'] # => "value"
+
+==== Task: Retrieve the Attribute Value for a Name and Namespace
+
+Use method
+{Element#attribute}[../../../../REXML/Element.html#method-i-attribute]
+to retrieve the value for an attribute name:
+
+ xml_string = "<root xmlns:a='a' a:x='a:x' x='x'/>"
+ d = REXML::Document.new(xml_string)
+ e = d.root
+ e.attribute("x") # => x='x'
+ e.attribute("x", "a") # => a:x='a:x'
+
+==== Task: Delete an Attribute
+
+Use method
+{Element#delete_attribute}[../../../../REXML/Element.html#method-i-delete_attribute]
+to remove an attribute:
+
+ e = REXML::Element.new('foo')
+ e.add_attribute('bar', 'baz')
+ e.delete_attribute('bar')
+ e.delete_attribute('bar')
+ e['bar'] # => nil
+
+==== Task: Determine Whether the Element Has Attributes
+
+Use method
+{Element#has_attributes?}[../../../../REXML/Element.html#method-i-has_attributes-3F]
+to determine whether the element has attributes:
+
+ e = REXML::Element.new('foo')
+ e.has_attributes? # => false
+ e.add_attribute('bar', 'baz')
+ e.has_attributes? # => true
+
+=== Children
+
+<em>Element Children</em>
+
+==== Task: Create and Add an Element
+
+Use method
+{Element#add_element}[../../../../REXML/Element.html#method-i-add_element]
+to create a new element and add it to this element:
+
+ e0 = REXML::Element.new('foo')
+ e0.add_element('bar')
+ e0.children # => [<bar/>]
+
+==== Task: Add an Existing Element
+
+Use method
+{Element#add_element}[../../../../REXML/Element.html#method-i-add_element]
+to add an element to this element:
+
+ e0 = REXML::Element.new('foo')
+ e1 = REXML::Element.new('bar')
+ e0.add_element(e1)
+ e0.children # => [<bar/>]
+
+==== Task: Create and Add an Element with Attributes
+
+Use method
+{Element#add_element}[../../../../REXML/Element.html#method-i-add_element]
+to create a new element with attributes, and add it to this element:
+
+ e0 = REXML::Element.new('foo')
+ e0.add_element('bar', {'name' => 'value'})
+ e0.children # => [<bar name='value'/>]
+
+==== Task: Add an Existing Element with Added Attributes
+
+Use method
+{Element#add_element}[../../../../REXML/Element.html#method-i-add_element]
+to add an element to this element:
+
+ e0 = REXML::Element.new('foo')
+ e1 = REXML::Element.new('bar')
+ e0.add_element(e1, {'name' => 'value'})
+ e0.children # => [<bar name='value'/>]
+
+==== Task: Delete a Specified Element
+
+Use method
+{Element#delete_element}[../../../../REXML/Element.html#method-i-delete_element]
+to remove a specified element from this element:
+
+ e0 = REXML::Element.new('foo')
+ e1 = REXML::Element.new('bar')
+ e0.add_element(e1)
+ e0.children # => [<bar/>]
+ e0.delete_element(e1)
+ e0.children # => []
+
+==== Task: Delete an Element by Index
+
+Use method
+{Element#delete_element}[../../../../REXML/Element.html#method-i-delete_element]
+to remove an element from this element by index:
+
+ e0 = REXML::Element.new('foo')
+ e1 = REXML::Element.new('bar')
+ e0.add_element(e1)
+ e0.children # => [<bar/>]
+ e0.delete_element(1)
+ e0.children # => []
+
+==== Task: Delete an Element by XPath
+
+Use method
+{Element#delete_element}[../../../../REXML/Element.html#method-i-delete_element]
+to remove an element from this element by XPath:
+
+ e0 = REXML::Element.new('foo')
+ e1 = REXML::Element.new('bar')
+ e0.add_element(e1)
+ e0.children # => [<bar/>]
+ e0.delete_element('//bar/')
+ e0.children # => []
+
+==== Task: Determine Whether Element Children
+
+Use method
+{Element#has_elements?}[../../../../REXML/Element.html#method-i-has_elements-3F]
+to determine whether the element has element children:
+
+ e0 = REXML::Element.new('foo')
+ e0.has_elements? # => false
+ e0.add_element(REXML::Element.new('bar'))
+ e0.has_elements? # => true
+
+==== Task: Get Element Descendants by XPath
+
+Use method
+{Element#get_elements}[../../../../REXML/Element.html#method-i-get_elements]
+to fetch all element descendant children by XPath:
+
+ xml_string = <<-EOT
+ <root>
+ <a level='1'>
+ <a level='2'/>
+ </a>
+ </root>
+ EOT
+ d = REXML::Document.new(xml_string)
+ d.root.get_elements('//a') # => [<a level='1'> ... </>, <a level='2'/>]
+
+==== Task: Get Next Element Sibling
+
+Use method
+{Element#next_element}[../../../../REXML/Element.html#method-i-next_element]
+to retrieve the next element sibling:
+
+ d = REXML::Document.new '<a><b/>text<c/></a>'
+ d.root.elements['b'].next_element #-> <c/>
+ d.root.elements['c'].next_element #-> nil
+
+==== Task: Get Previous Element Sibling
+
+Use method
+{Element#previous_element}[../../../../REXML/Element.html#method-i-previous_element]
+to retrieve the previous element sibling:
+
+ d = REXML::Document.new '<a><b/>text<c/></a>'
+ d.root.elements['c'].previous_element #-> <b/>
+ d.root.elements['b'].previous_element #-> nil
+
+<em>Text Children</em>
+
+==== Task: Add a Text Node
+
+Use method
+{Element#add_text}[../../../../REXML/Element.html#method-i-add_text]
+to add a text node to the element:
+
+ d = REXML::Document.new('<a>foo<b/>bar</a>')
+ e = d.root
+ e.add_text(REXML::Text.new('baz'))
+ e.to_a # => ["foo", <b/>, "bar", "baz"]
+ e.add_text(REXML::Text.new('baz'))
+ e.to_a # => ["foo", <b/>, "bar", "baz", "baz"]
+
+==== Task: Replace the First Text Node
+
+Use method
+{Element#text=}[../../../../REXML/Element.html#method-i-text-3D]
+to replace the first text node in the element:
+
+ d = REXML::Document.new('<root><a/>text<b/>more<c/></root>')
+ e = d.root
+ e.to_a # => [<a/>, "text", <b/>, "more", <c/>]
+ e.text = 'oops'
+ e.to_a # => [<a/>, "oops", <b/>, "more", <c/>]
+
+==== Task: Remove the First Text Node
+
+Use method
+{Element#text=}[../../../../REXML/Element.html#method-i-text-3D]
+to remove the first text node in the element:
+
+ d = REXML::Document.new('<root><a/>text<b/>more<c/></root>')
+ e = d.root
+ e.to_a # => [<a/>, "text", <b/>, "more", <c/>]
+ e.text = nil
+ e.to_a # => [<a/>, <b/>, "more", <c/>]
+
+==== Task: Retrieve the First Text Node
+
+Use method
+{Element#get_text}[../../../../REXML/Element.html#method-i-get_text]
+to retrieve the first text node in the element:
+
+ d = REXML::Document.new('<root><a/>text<b/>more<c/></root>')
+ e = d.root
+ e.to_a # => [<a/>, "text", <b/>, "more", <c/>]
+ e.get_text # => "text"
+
+==== Task: Retrieve a Specific Text Node
+
+Use method
+{Element#get_text}[../../../../REXML/Element.html#method-i-get_text]
+to retrieve the first text node in a specified element:
+
+ d = REXML::Document.new "<root>some text <b>this is bold!</b> more text</root>"
+ e = d.root
+ e.get_text('//root') # => "some text "
+ e.get_text('//b') # => "this is bold!"
+
+==== Task: Determine Whether the Element has Text Nodes
+
+Use method
+{Element#has_text?}[../../../../REXML/Element.html#method-i-has_text-3F]
+to determine whether the element has text:
+
+ e = REXML::Element.new('foo')
+ e.has_text? # => false
+ e.add_text('bar')
+ e.has_text? # => true
+
+<em>Other Children</em>
+
+==== Task: Get the Child at a Given Index
+
+Use method
+{Element#[]}[../../../../REXML/Element.html#method-i-5B-5D]
+to retrieve the child at a given index:
+
+ d = REXML::Document.new '><root><a/>text<b/>more<c/></root>'
+ e = d.root
+ e[0] # => <a/>
+ e[1] # => "text"
+ e[2] # => <b/>
+
+==== Task: Get All CDATA Children
+
+Use method
+{Element#cdatas}[../../../../REXML/Element.html#method-i-cdatas]
+to retrieve all CDATA children:
+
+ xml_string = <<-EOT
+ <root>
+ <![CDATA[foo]]>
+ <![CDATA[bar]]>
+ </root>
+ EOT
+ d = REXML::Document.new(xml_string)
+ d.root.cdatas # => ["foo", "bar"]
+
+==== Task: Get All Comment Children
+
+Use method
+{Element#comments}[../../../../REXML/Element.html#method-i-comments]
+to retrieve all comment children:
+
+ xml_string = <<-EOT
+ <root>
+ <!--foo-->
+ <!--bar-->
+ </root>
+ EOT
+ d = REXML::Document.new(xml_string)
+ d.root.comments.map {|comment| comment.to_s } # => ["foo", "bar"]
+
+==== Task: Get All Processing Instruction Children
+
+Use method
+{Element#instructions}[../../../../REXML/Element.html#method-i-instructions]
+to retrieve all processing instruction children:
+
+ xml_string = <<-EOT
+ <root>
+ <?target0 foo?>
+ <?target1 bar?>
+ </root>
+ EOT
+ d = REXML::Document.new(xml_string)
+ instructions = d.root.instructions.map {|instruction| instruction.to_s }
+ instructions # => ["<?target0 foo?>", "<?target1 bar?>"]
+
+==== Task: Get All Text Children
+
+Use method
+{Element#texts}[../../../../REXML/Element.html#method-i-texts]
+to retrieve all text children:
+
+ xml_string = '<root><a/>text<b/>more<c/></root>'
+ d = REXML::Document.new(xml_string)
+ d.root.texts # => ["text", "more"]
+
+=== Namespaces
+
+==== Task: Add a Namespace
+
+Use method
+{Element#add_namespace}[../../../../REXML/Element.html#method-i-add_namespace]
+to add a namespace to the element:
+
+ e = REXML::Element.new('foo')
+ e.add_namespace('bar')
+ e.namespaces # => {"xmlns"=>"bar"}
+
+==== Task: Delete the Default Namespace
+
+Use method
+{Element#delete_namespace}[../../../../REXML/Element.html#method-i-delete_namespace]
+to remove the default namespace from the element:
+
+ d = REXML::Document.new "<a xmlns:foo='bar' xmlns='twiddle'/>"
+ d.to_s # => "<a xmlns:foo='bar' xmlns='twiddle'/>"
+ d.root.delete_namespace # => <a xmlns:foo='bar'/>
+ d.to_s # => "<a xmlns:foo='bar'/>"
+
+==== Task: Delete a Specific Namespace
+
+Use method
+{Element#delete_namespace}[../../../../REXML/Element.html#method-i-delete_namespace]
+to remove a specific namespace from the element:
+
+ d = REXML::Document.new "<a xmlns:foo='bar' xmlns='twiddle'/>"
+ d.to_s # => "<a xmlns:foo='bar' xmlns='twiddle'/>"
+ d.root.delete_namespace # => <a xmlns:foo='bar'/>
+ d.to_s # => "<a xmlns:foo='bar'/>"
+ d.root.delete_namespace('foo')
+ d.to_s # => "<a/>"
+
+==== Task: Get a Namespace URI
+
+Use method
+{Element#namespace}[../../../../REXML/Element.html#method-i-namespace]
+to retrieve a specific namespace URI for the element:
+
+ xml_string = <<-EOT
+ <root>
+ <a xmlns='1' xmlns:y='2'>
+ <b/>
+ <c xmlns:z='3'/>
+ </a>
+ </root>
+ EOT
+ d = REXML::Document.new(xml_string)
+ b = d.elements['//b']
+ b.namespace # => "1"
+ b.namespace('y') # => "2"
+
+==== Task: Retrieve Namespaces
+
+Use method
+{Element#namespaces}[../../../../REXML/Element.html#method-i-namespaces]
+to retrieve all namespaces for the element:
+
+ xml_string = '<a xmlns="foo" xmlns:x="bar" xmlns:y="twee" z="glorp"/>'
+ d = REXML::Document.new(xml_string)
+ d.root.attributes.namespaces # => {"xmlns"=>"foo", "x"=>"bar", "y"=>"twee"}
+
+==== Task: Retrieve Namespace Prefixes
+
+Use method
+{Element#prefixes}[../../../../REXML/Element.html#method-i-prefixes]
+to retrieve all prefixes (namespace names) for the element:
+
+ xml_string = <<-EOT
+ <root>
+ <a xmlns:x='1' xmlns:y='2'>
+ <b/>
+ <c xmlns:z='3'/>
+ </a>
+ </root>
+ EOT
+ d = REXML::Document.new(xml_string, {compress_whitespace: :all})
+ d.elements['//a'].prefixes # => ["x", "y"]
+ d.elements['//b'].prefixes # => ["x", "y"]
+ d.elements['//c'].prefixes # => ["x", "y", "z"]
+
+=== Iteration
+
+==== Task: Iterate Over Elements
+
+Use method
+{Element#each_element}[../../../../REXML/Element.html#method-i-each_element]
+to iterate over element children:
+
+ d = REXML::Document.new '<a><b>b</b><c>b</c><d>d</d><e/></a>'
+ d.root.each_element {|e| p e }
+
+Output:
+
+ <b> ... </>
+ <c> ... </>
+ <d> ... </>
+ <e/>
+
+==== Task: Iterate Over Elements Having a Specified Attribute
+
+Use method
+{Element#each_element_with_attribute}[../../../../REXML/Element.html#method-i-each_element_with_attribute]
+to iterate over element children that have a specified attribute:
+
+ d = REXML::Document.new '<a><b id="1"/><c id="2"/><d id="1"/><e/></a>'
+ a = d.root
+ a.each_element_with_attribute('id') {|e| p e }
+
+Output:
+
+ <b id='1'/>
+ <c id='2'/>
+ <d id='1'/>
+
+==== Task: Iterate Over Elements Having a Specified Attribute and Value
+
+Use method
+{Element#each_element_with_attribute}[../../../../REXML/Element.html#method-i-each_element_with_attribute]
+to iterate over element children that have a specified attribute and value:
+
+ d = REXML::Document.new '<a><b id="1"/><c id="2"/><d id="1"/><e/></a>'
+ a = d.root
+ a.each_element_with_attribute('id', '1') {|e| p e }
+
+Output:
+
+ <b id='1'/>
+ <d id='1'/>
+
+==== Task: Iterate Over Elements Having Specified Text
+
+Use method
+{Element#each_element_with_text}[../../../../REXML/Element.html#method-i-each_element_with_text]
+to iterate over element children that have specified text:
+
+
+=== Context
+
+#whitespace
+#ignore_whitespace_nodes
+#raw
+
+=== Other Getters
+
+#document
+#root
+#root_node
+#node_type
+#xpath
+#inspect
diff --git a/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/node.rdoc b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/node.rdoc
new file mode 100644
index 0000000..d5d2e12
--- /dev/null
+++ b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/node.rdoc
@@ -0,0 +1,97 @@
+== Module Node
+
+:include: ../tocs/node_toc.rdoc
+
+=== Siblings
+
+==== Task: Find Previous Sibling
+
+Use method
+{Node.previous_sibling_node}[../../../../REXML/Node.html#method-i-previous_sibling]
+to retrieve the previous sibling:
+
+ d = REXML::Document.new('<root><a/><b/><c/></root>')
+ b = d.root[1] # => <b/>
+ b.previous_sibling_node # => <a/>
+
+==== Task: Find Next Sibling
+
+Use method
+{Node.next_sibling_node}[../../../../REXML/Node.html#method-i-next_sibling]
+to retrieve the next sibling:
+
+ d = REXML::Document.new('<root><a/><b/><c/></root>')
+ b = d.root[1] # => <b/>
+ b.next_sibling_node # => <c/>
+
+=== Position
+
+==== Task: Find Own Index Among Siblings
+
+Use method
+{Node.index_in_parent}[../../../../REXML/Node.html#method-i-index_in_parent]
+to retrieve the 1-based index of this node among its siblings:
+
+ d = REXML::Document.new('<root><a/><b/><c/></root>')
+ b = d.root[1] # => <b/>
+ b.index_in_parent # => 2
+
+=== Recursive Traversal
+
+==== Task: Traverse Each Recursively
+
+Use method
+{Node.each_recursive}[../../../../REXML/Node.html#method-i-each_recursive]
+to traverse a tree of nodes recursively:
+
+ xml_string = '<root><a><b><c></c></b><b><c></c></b></a></root>'
+ d = REXML::Document.new(xml_string)
+ d.root.each_recursive {|node| p node }
+
+Output:
+
+ <a> ... </>
+ <b> ... </>
+ <c/>
+ <b> ... </>
+ <c/>
+
+=== Recursive Search
+
+==== Task: Traverse Each Recursively
+
+Use method
+{Node.find_first_recursive}[../../../../REXML/Node.html#method-i-find_first_recursive]
+to search a tree of nodes recursively:
+
+ xml_string = '<root><a><b><c></c></b><b><c></c></b></a></root>'
+ d = REXML::Document.new(xml_string)
+ d.root.find_first_recursive {|node| node.name == 'c' } # => <c/>
+
+=== Representation
+
+==== Task: Represent a String
+
+Use method {Node.to_s}[../../../../REXML/Node.html#method-i-to_s]
+to represent the node as a string:
+
+ xml_string = '<root><a><b><c></c></b><b><c></c></b></a></root>'
+ d = REXML::Document.new(xml_string)
+ d.root.to_s # => "<root><a><b><c/></b><b><c/></b></a></root>"
+
+=== Parent?
+
+==== Task: Determine Whether the Node is a Parent
+
+Use method {Node.parent?}[../../../../REXML/Node.html#method-i-parent-3F]
+to determine whether the node is a parent;
+class Text derives from Node:
+
+ d = REXML::Document.new('<root><a/>text<b/>more<c/></root>')
+ t = d.root[1] # => "text"
+ t.parent? # => false
+
+Class Parent also derives from Node, but overrides this method:
+
+ p = REXML::Parent.new
+ p.parent? # => true
diff --git a/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/parent.rdoc b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/parent.rdoc
new file mode 100644
index 0000000..54f1dbe
--- /dev/null
+++ b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/parent.rdoc
@@ -0,0 +1,267 @@
+== Class Parent
+
+Class Parent has methods from its superclasses and included modules;
+see:
+
+- {Tasks for Child}[child_rdoc.html].
+- {Tasks for Node}[node_rdoc.html].
+- {Module Enumerable}[https://docs.ruby-lang.org/en/master/Enumerable.html].
+
+:include: ../tocs/parent_toc.rdoc
+
+=== Queries
+
+==== Task: Get the Count of Children
+
+Use method {Parent#size}[../../../../REXML/Parent.html#method-i-size]
+(or its alias +length+) to get the count of the parent's children:
+
+ p = REXML::Parent.new
+ p.size # => 0
+ xml_string = '<root><a/><b/><c/></root>'
+ d = REXML::Document.new(xml_string)
+ d.root.size # => 3
+
+==== Task: Get the Child at a Given Index
+
+Use method {Parent#[]}[../../../../REXML/Parent.html#method-i-5B-5D]
+to get the child at a given index:
+
+ xml_string = '<root><a/><b/><c/></root>'
+ d = REXML::Document.new(xml_string)
+ d.root[1] # => <b/>
+ d.root[-1] # => <c/>
+ d.root[50] # => nil
+
+==== Task: Get the Index of a Given Child
+
+Use method {Parent#index}[../../../../REXML/Parent.html#method-i-index]
+to get the index (0-based offset) of a child:
+
+ d = REXML::Document.new('<root></root>')
+ root = d.root
+ e0 = REXML::Element.new('foo')
+ e1 = REXML::Element.new('bar')
+ root.add(e0) # => <foo/>
+ root.add(e1) # => <bar/>
+ root.add(e0) # => <foo/>
+ root.add(e1) # => <bar/>
+ root.index(e0) # => 0
+ root.index(e1) # => 1
+
+==== Task: Get the Children
+
+Use method {Parent#children}[../../../../REXML/Parent.html#method-i-children]
+(or its alias +to_a+) to get the parent's children:
+
+ xml_string = '<root><a/><b/><c/></root>'
+ d = REXML::Document.new(xml_string)
+ d.root.children # => [<a/>, <b/>, <c/>]
+
+==== Task: Determine Whether the Node is a Parent
+
+Use method {Parent#parent?}[../../../../REXML/Parent.html#method-i-parent-3F]
+to determine whether the node is a parent;
+class Text derives from Node:
+
+ d = REXML::Document.new('<root><a/>text<b/>more<c/></root>')
+ t = d.root[1] # => "text"
+ t.parent? # => false
+
+Class Parent also derives from Node, but overrides this method:
+
+ p = REXML::Parent.new
+ p.parent? # => true
+
+=== Additions
+
+==== Task: Add a Child at the Beginning
+
+Use method {Parent#unshift}[../../../../REXML/Parent.html#method-i-unshift]
+to add a child as at the beginning of the children:
+
+ xml_string = '<root><a/><b/><c/></root>'
+ d = REXML::Document.new(xml_string)
+ d.root.children # => [<a/>, <b/>, <c/>]
+ d.root.unshift REXML::Element.new('d')
+ d.root.children # => [<d/>, <a/>, <b/>, <c/>]
+
+==== Task: Add a Child at the End
+
+Use method {Parent#<<}[../../../../REXML/Parent.html#method-i-3C-3C]
+(or an alias +push+ or +add+) to add a child as at the end of the children:
+
+ xml_string = '<root><a/><b/><c/></root>'
+ d = REXML::Document.new(xml_string)
+ d.root.children # => [<a/>, <b/>, <c/>]
+ d.root << REXML::Element.new('d')
+ d.root.children # => [<a/>, <b/>, <c/>, <d/>]
+
+==== Task: Replace a Child with Another Child
+
+Use method {Parent#replace}[../../../../REXML/Parent.html#method-i-replace]
+
+ xml_string = '<root><a/><b/><c/></root>'
+ d = REXML::Document.new(xml_string)
+ d.root.children # => [<a/>, <b/>, <c/>]
+ b = d.root[1] # => <b/>
+ d.replace_child(b, REXML::Element.new('d'))
+ d.root.children # => [<a/>, <c/>]
+
+==== Task: Replace Multiple Children with Another Child
+
+Use method {Parent#[]=}[../../../../REXML/Parent.html#method-i-parent-5B-5D-3D]
+to replace multiple consecutive children with another child:
+
+ xml_string = '<root><a/><b/><c/><d/></root>'
+ d = REXML::Document.new(xml_string)
+ d.root.children # => [<a/>, <b/>, <c/>, <d/>]
+ d.root[1, 2] = REXML::Element.new('x')
+ d.root.children # => [<a/>, <x/>, <d/>]
+ d.root[1, 5] = REXML::Element.new('x')
+ d.root.children # => [<a/>, <x/>] # BUG?
+
+==== Task: Insert Child Before a Given Child
+
+Use method {Parent#insert_before}[../../../../REXML/Parent.html#method-i-insert_before]
+to insert a child immediately before a given child:
+
+ xml_string = '<root><a/><b/><c/></root>'
+ d = REXML::Document.new(xml_string)
+ d.root.children # => [<a/>, <b/>, <c/>]
+ b = d.root[1] # => <b/>
+ x = REXML::Element.new('x')
+ d.root.insert_before(b, x)
+ d.root.children # => [<a/>, <x/>, <b/>, <c/>]
+
+==== Task: Insert Child After a Given Child
+
+Use method {Parent#insert_after}[../../../../REXML/Parent.html#method-i-insert_after]
+to insert a child immediately after a given child:
+
+ xml_string = '<root><a/><b/><c/></root>'
+ d = REXML::Document.new(xml_string)
+ d.root.children # => [<a/>, <b/>, <c/>]
+ b = d.root[1] # => <b/>
+ x = REXML::Element.new('x')
+ d.root.insert_after(b, x)
+ d.root.children # => [<a/>, <b/>, <x/>, <c/>]
+
+=== Deletions
+
+==== Task: Remove a Given Child
+
+Use method {Parent#delete}[../../../../REXML/Parent.html#method-i-delete]
+to remove all occurrences of a given child:
+
+ d = REXML::Document.new('<root></root>')
+ a = REXML::Element.new('a')
+ b = REXML::Element.new('b')
+ d.root.add(a)
+ d.root.add(b)
+ d.root.add(a)
+ d.root.add(b)
+ d.root.children # => [<a/>, <b/>, <a/>, <b/>]
+ d.root.delete(b)
+ d.root.children # => [<a/>, <a/>]
+
+==== Task: Remove the Child at a Specified Offset
+
+Use method {Parent#delete_at}[../../../../REXML/Parent.html#method-i-delete_at]
+to remove the child at a specified offset:
+
+ d = REXML::Document.new('<root></root>')
+ a = REXML::Element.new('a')
+ b = REXML::Element.new('b')
+ d.root.add(a)
+ d.root.add(b)
+ d.root.add(a)
+ d.root.add(b)
+ d.root.children # => [<a/>, <b/>, <a/>, <b/>]
+ d.root.delete_at(2)
+ d.root.children # => [<a/>, <b/>, <b/>]
+
+==== Task: Remove Children That Meet Specified Criteria
+
+Use method {Parent#delete_if}[../../../../REXML/Parent.html#method-i-delete_if]
+to remove children that meet criteria specified in the given block:
+
+ d = REXML::Document.new('<root></root>')
+ d.root.add(REXML::Element.new('x'))
+ d.root.add(REXML::Element.new('xx'))
+ d.root.add(REXML::Element.new('xxx'))
+ d.root.add(REXML::Element.new('xxxx'))
+ d.root.children # => [<x/>, <xx/>, <xxx/>, <xxxx/>]
+ d.root.delete_if {|child| child.name.size.odd? }
+ d.root.children # => [<xx/>, <xxxx/>]
+
+=== Iterations
+
+==== Task: Iterate Over Children
+
+Use method {Parent#each_child}[../../../../REXML/Parent.html#method-i-each_child]
+(or its alias +each+) to iterate over all children:
+
+ xml_string = '<root><a/><b/><c/></root>'
+ d = REXML::Document.new(xml_string)
+ d.root.children # => [<a/>, <b/>, <c/>]
+ d.root.each_child {|child| p child }
+
+Output:
+
+ <a/>
+ <b/>
+ <c/>
+
+==== Task: Iterate Over Child Indexes
+
+Use method {Parent#each_index}[../../../../REXML/Parent.html#method-i-each_index]
+to iterate over all child indexes:
+
+ xml_string = '<root><a/><b/><c/></root>'
+ d = REXML::Document.new(xml_string)
+ d.root.children # => [<a/>, <b/>, <c/>]
+ d.root.each_index {|child| p child }
+
+Output:
+
+ 0
+ 1
+ 2
+
+=== Clones
+
+==== Task: Clone Deeply
+
+Use method {Parent#deep_clone}[../../../../REXML/Parent.html#method-i-deep_clone]
+to clone deeply; that is, to clone every nested node that is a Parent object:
+
+ xml_string = <<-EOT
+ <?xml version="1.0" encoding="UTF-8"?>
+ <bookstore>
+ <book category="cooking">
+ <title lang="en">Everyday Italian</title>
+ <author>Giada De Laurentiis</author>
+ <year>2005</year>
+ <price>30.00</price>
+ </book>
+ <book category="children">
+ <title lang="en">Harry Potter</title>
+ <author>J K. Rowling</author>
+ <year>2005</year>
+ <price>29.99</price>
+ </book>
+ <book category="web">
+ <title lang="en">Learning XML</title>
+ <author>Erik T. Ray</author>
+ <year>2003</year>
+ <price>39.95</price>
+ </book>
+ </bookstore>
+ EOT
+ d = REXML::Document.new(xml_string)
+ root = d.root
+ shallow = root.clone
+ deep = root.deep_clone
+ shallow.to_s.size # => 12
+ deep.to_s.size # => 590
diff --git a/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/child_toc.rdoc b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/child_toc.rdoc
new file mode 100644
index 0000000..a2083a0
--- /dev/null
+++ b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/child_toc.rdoc
@@ -0,0 +1,12 @@
+Tasks on this page:
+
+- {Relationships}[#label-Relationships]
+ - {Task: Set the Parent}[#label-Task-3A+Set+the+Parent]
+ - {Task: Insert Previous Sibling}[#label-Task-3A+Insert+Previous+Sibling]
+ - {Task: Insert Next Sibling}[#label-Task-3A+Insert+Next+Sibling]
+- {Removal or Replacement}[#label-Removal+or+Replacement]
+ - {Task: Remove Child from Parent}[#label-Task-3A+Remove+Child+from+Parent]
+ - {Task: Replace Child}[#label-Task-3A+Replace+Child]
+- {Document}[#label-Document]
+ - {Task: Get the Document}[#label-Task-3A+Get+the+Document]
+
diff --git a/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/document_toc.rdoc b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/document_toc.rdoc
new file mode 100644
index 0000000..5db055f
--- /dev/null
+++ b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/document_toc.rdoc
@@ -0,0 +1,30 @@
+Tasks on this page:
+
+- {New Document}[#label-New+Document]
+ - {Task: Create an Empty Document}[#label-Task-3A+Create+an+Empty+Document]
+ - {Task: Parse a String into a New Document}[#label-Task-3A+Parse+a+String+into+a+New+Document]
+ - {Task: Parse an IO Stream into a New Document}[#label-Task-3A+Parse+an+IO+Stream+into+a+New+Document]
+ - {Task: Create a Document from an Existing Document}[#label-Task-3A+Create+a+Document+from+an+Existing+Document]
+ - {Task: Clone a Document}[#label-Task-3A+Clone+a+Document]
+- {Document Type}[#label-Document+Type]
+ - {Task: Get the Document Type}[#label-Task-3A+Get+the+Document+Type]
+ - {Task: Set the Document Type}[#label-Task-3A+Set+the+Document+Type]
+- {XML Declaration}[#label-XML+Declaration]
+ - {Task: Get the XML Declaration}[#label-Task-3A+Get+the+XML+Declaration]
+ - {Task: Set the XML Declaration}[#label-Task-3A+Set+the+XML+Declaration]
+- {Children}[#label-Children]
+ - {Task: Add an Element Child}[#label-Task-3A+Add+an+Element+Child]
+ - {Task: Add a Non-Element Child}[#label-Task-3A+Add+a+Non-Element+Child]
+- {Writing}[#label-Writing]
+ - {Task: Write to $stdout}[#label-Task-3A+Write+to+-24stdout]
+ - {Task: Write to IO Stream}[#label-Task-3A+Write+to+IO+Stream]
+ - {Task: Write with No Indentation}[#label-Task-3A+Write+with+No+Indentation]
+ - {Task: Write with Specified Indentation}[#label-Task-3A+Write+with+Specified+Indentation]
+- {Querying}[#label-Querying]
+ - {Task: Get the Document}[#label-Task-3A+Get+the+Document]
+ - {Task: Get the Encoding}[#label-Task-3A+Get+the+Encoding]
+ - {Task: Get the Node Type}[#label-Task-3A+Get+the+Node+Type]
+ - {Task: Get the Root Element}[#label-Task-3A+Get+the+Root+Element]
+ - {Task: Determine Whether Stand-Alone}[#label-Task-3A+Determine+Whether+Stand-Alone]
+ - {Task: Get the Version}[#label-Task-3A+Get+the+Version]
+
diff --git a/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/element_toc.rdoc b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/element_toc.rdoc
new file mode 100644
index 0000000..60a504a
--- /dev/null
+++ b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/element_toc.rdoc
@@ -0,0 +1,55 @@
+Tasks on this page:
+
+- {New Element}[#label-New+Element]
+ - {Task: Create a Default Element}[#label-Task-3A+Create+a+Default+Element]
+ - {Task: Create a Named Element}[#label-Task-3A+Create+a+Named+Element]
+ - {Task: Create an Element with Name and Parent}[#label-Task-3A+Create+an+Element+with+Name+and+Parent]
+ - {Task: Create an Element with Name, Parent, and Context}[#label-Task-3A+Create+an+Element+with+Name-2C+Parent-2C+and+Context]
+ - {Task: Create a Shallow Clone}[#label-Task-3A+Create+a+Shallow+Clone]
+- {Attributes}[#label-Attributes]
+ - {Task: Create and Add an Attribute}[#label-Task-3A+Create+and+Add+an+Attribute]
+ - {Task: Add an Existing Attribute}[#label-Task-3A+Add+an+Existing+Attribute]
+ - {Task: Add Multiple Attributes from a Hash}[#label-Task-3A+Add+Multiple+Attributes+from+a+Hash]
+ - {Task: Add Multiple Attributes from an Array}[#label-Task-3A+Add+Multiple+Attributes+from+an+Array]
+ - {Task: Retrieve the Value for an Attribute Name}[#label-Task-3A+Retrieve+the+Value+for+an+Attribute+Name]
+ - {Task: Retrieve the Attribute Value for a Name and Namespace}[#label-Task-3A+Retrieve+the+Attribute+Value+for+a+Name+and+Namespace]
+ - {Task: Delete an Attribute}[#label-Task-3A+Delete+an+Attribute]
+ - {Task: Determine Whether the Element Has Attributes}[#label-Task-3A+Determine+Whether+the+Element+Has+Attributes]
+- {Children}[#label-Children]
+ - {Task: Create and Add an Element}[#label-Task-3A+Create+and+Add+an+Element]
+ - {Task: Add an Existing Element}[#label-Task-3A+Add+an+Existing+Element]
+ - {Task: Create and Add an Element with Attributes}[#label-Task-3A+Create+and+Add+an+Element+with+Attributes]
+ - {Task: Add an Existing Element with Added Attributes}[#label-Task-3A+Add+an+Existing+Element+with+Added+Attributes]
+ - {Task: Delete a Specified Element}[#label-Task-3A+Delete+a+Specified+Element]
+ - {Task: Delete an Element by Index}[#label-Task-3A+Delete+an+Element+by+Index]
+ - {Task: Delete an Element by XPath}[#label-Task-3A+Delete+an+Element+by+XPath]
+ - {Task: Determine Whether Element Children}[#label-Task-3A+Determine+Whether+Element+Children]
+ - {Task: Get Element Descendants by XPath}[#label-Task-3A+Get+Element+Descendants+by+XPath]
+ - {Task: Get Next Element Sibling}[#label-Task-3A+Get+Next+Element+Sibling]
+ - {Task: Get Previous Element Sibling}[#label-Task-3A+Get+Previous+Element+Sibling]
+ - {Task: Add a Text Node}[#label-Task-3A+Add+a+Text+Node]
+ - {Task: Replace the First Text Node}[#label-Task-3A+Replace+the+First+Text+Node]
+ - {Task: Remove the First Text Node}[#label-Task-3A+Remove+the+First+Text+Node]
+ - {Task: Retrieve the First Text Node}[#label-Task-3A+Retrieve+the+First+Text+Node]
+ - {Task: Retrieve a Specific Text Node}[#label-Task-3A+Retrieve+a+Specific+Text+Node]
+ - {Task: Determine Whether the Element has Text Nodes}[#label-Task-3A+Determine+Whether+the+Element+has+Text+Nodes]
+ - {Task: Get the Child at a Given Index}[#label-Task-3A+Get+the+Child+at+a+Given+Index]
+ - {Task: Get All CDATA Children}[#label-Task-3A+Get+All+CDATA+Children]
+ - {Task: Get All Comment Children}[#label-Task-3A+Get+All+Comment+Children]
+ - {Task: Get All Processing Instruction Children}[#label-Task-3A+Get+All+Processing+Instruction+Children]
+ - {Task: Get All Text Children}[#label-Task-3A+Get+All+Text+Children]
+- {Namespaces}[#label-Namespaces]
+ - {Task: Add a Namespace}[#label-Task-3A+Add+a+Namespace]
+ - {Task: Delete the Default Namespace}[#label-Task-3A+Delete+the+Default+Namespace]
+ - {Task: Delete a Specific Namespace}[#label-Task-3A+Delete+a+Specific+Namespace]
+ - {Task: Get a Namespace URI}[#label-Task-3A+Get+a+Namespace+URI]
+ - {Task: Retrieve Namespaces}[#label-Task-3A+Retrieve+Namespaces]
+ - {Task: Retrieve Namespace Prefixes}[#label-Task-3A+Retrieve+Namespace+Prefixes]
+- {Iteration}[#label-Iteration]
+ - {Task: Iterate Over Elements}[#label-Task-3A+Iterate+Over+Elements]
+ - {Task: Iterate Over Elements Having a Specified Attribute}[#label-Task-3A+Iterate+Over+Elements+Having+a+Specified+Attribute]
+ - {Task: Iterate Over Elements Having a Specified Attribute and Value}[#label-Task-3A+Iterate+Over+Elements+Having+a+Specified+Attribute+and+Value]
+ - {Task: Iterate Over Elements Having Specified Text}[#label-Task-3A+Iterate+Over+Elements+Having+Specified+Text]
+- {Context}[#label-Context]
+- {Other Getters}[#label-Other+Getters]
+
diff --git a/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/master_toc.rdoc b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/master_toc.rdoc
new file mode 100644
index 0000000..0214f6b
--- /dev/null
+++ b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/master_toc.rdoc
@@ -0,0 +1,135 @@
+== Tasks
+
+=== {Child}[../../tasks/rdoc/child_rdoc.html]
+- {Relationships}[../../tasks/rdoc/child_rdoc.html#label-Relationships]
+ - {Task: Set the Parent}[../../tasks/rdoc/child_rdoc.html#label-Task-3A+Set+the+Parent]
+ - {Task: Insert Previous Sibling}[../../tasks/rdoc/child_rdoc.html#label-Task-3A+Insert+Previous+Sibling]
+ - {Task: Insert Next Sibling}[../../tasks/rdoc/child_rdoc.html#label-Task-3A+Insert+Next+Sibling]
+- {Removal or Replacement}[../../tasks/rdoc/child_rdoc.html#label-Removal+or+Replacement]
+ - {Task: Remove Child from Parent}[../../tasks/rdoc/child_rdoc.html#label-Task-3A+Remove+Child+from+Parent]
+ - {Task: Replace Child}[../../tasks/rdoc/child_rdoc.html#label-Task-3A+Replace+Child]
+- {Document}[../../tasks/rdoc/child_rdoc.html#label-Document]
+ - {Task: Get the Document}[../../tasks/rdoc/child_rdoc.html#label-Task-3A+Get+the+Document]
+
+=== {Document}[../../tasks/rdoc/document_rdoc.html]
+- {New Document}[../../tasks/rdoc/document_rdoc.html#label-New+Document]
+ - {Task: Create an Empty Document}[../../tasks/rdoc/document_rdoc.html#label-Task-3A+Create+an+Empty+Document]
+ - {Task: Parse a String into a New Document}[../../tasks/rdoc/document_rdoc.html#label-Task-3A+Parse+a+String+into+a+New+Document]
+ - {Task: Parse an IO Stream into a New Document}[../../tasks/rdoc/document_rdoc.html#label-Task-3A+Parse+an+IO+Stream+into+a+New+Document]
+ - {Task: Create a Document from an Existing Document}[../../tasks/rdoc/document_rdoc.html#label-Task-3A+Create+a+Document+from+an+Existing+Document]
+ - {Task: Clone a Document}[../../tasks/rdoc/document_rdoc.html#label-Task-3A+Clone+a+Document]
+- {Document Type}[../../tasks/rdoc/document_rdoc.html#label-Document+Type]
+ - {Task: Get the Document Type}[../../tasks/rdoc/document_rdoc.html#label-Task-3A+Get+the+Document+Type]
+ - {Task: Set the Document Type}[../../tasks/rdoc/document_rdoc.html#label-Task-3A+Set+the+Document+Type]
+- {XML Declaration}[../../tasks/rdoc/document_rdoc.html#label-XML+Declaration]
+ - {Task: Get the XML Declaration}[../../tasks/rdoc/document_rdoc.html#label-Task-3A+Get+the+XML+Declaration]
+ - {Task: Set the XML Declaration}[../../tasks/rdoc/document_rdoc.html#label-Task-3A+Set+the+XML+Declaration]
+- {Children}[../../tasks/rdoc/document_rdoc.html#label-Children]
+ - {Task: Add an Element Child}[../../tasks/rdoc/document_rdoc.html#label-Task-3A+Add+an+Element+Child]
+ - {Task: Add a Non-Element Child}[../../tasks/rdoc/document_rdoc.html#label-Task-3A+Add+a+Non-Element+Child]
+- {Writing}[../../tasks/rdoc/document_rdoc.html#label-Writing]
+ - {Task: Write to $stdout}[../../tasks/rdoc/document_rdoc.html#label-Task-3A+Write+to+-24stdout]
+ - {Task: Write to IO Stream}[../../tasks/rdoc/document_rdoc.html#label-Task-3A+Write+to+IO+Stream]
+ - {Task: Write with No Indentation}[../../tasks/rdoc/document_rdoc.html#label-Task-3A+Write+with+No+Indentation]
+ - {Task: Write with Specified Indentation}[../../tasks/rdoc/document_rdoc.html#label-Task-3A+Write+with+Specified+Indentation]
+- {Querying}[../../tasks/rdoc/document_rdoc.html#label-Querying]
+ - {Task: Get the Document}[../../tasks/rdoc/document_rdoc.html#label-Task-3A+Get+the+Document]
+ - {Task: Get the Encoding}[../../tasks/rdoc/document_rdoc.html#label-Task-3A+Get+the+Encoding]
+ - {Task: Get the Node Type}[../../tasks/rdoc/document_rdoc.html#label-Task-3A+Get+the+Node+Type]
+ - {Task: Get the Root Element}[../../tasks/rdoc/document_rdoc.html#label-Task-3A+Get+the+Root+Element]
+ - {Task: Determine Whether Stand-Alone}[../../tasks/rdoc/document_rdoc.html#label-Task-3A+Determine+Whether+Stand-Alone]
+ - {Task: Get the Version}[../../tasks/rdoc/document_rdoc.html#label-Task-3A+Get+the+Version]
+
+=== {Element}[../../tasks/rdoc/element_rdoc.html]
+- {New Element}[../../tasks/rdoc/element_rdoc.html#label-New+Element]
+ - {Task: Create a Default Element}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Create+a+Default+Element]
+ - {Task: Create a Named Element}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Create+a+Named+Element]
+ - {Task: Create an Element with Name and Parent}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Create+an+Element+with+Name+and+Parent]
+ - {Task: Create an Element with Name, Parent, and Context}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Create+an+Element+with+Name-2C+Parent-2C+and+Context]
+ - {Task: Create a Shallow Clone}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Create+a+Shallow+Clone]
+- {Attributes}[../../tasks/rdoc/element_rdoc.html#label-Attributes]
+ - {Task: Create and Add an Attribute}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Create+and+Add+an+Attribute]
+ - {Task: Add an Existing Attribute}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Add+an+Existing+Attribute]
+ - {Task: Add Multiple Attributes from a Hash}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Add+Multiple+Attributes+from+a+Hash]
+ - {Task: Add Multiple Attributes from an Array}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Add+Multiple+Attributes+from+an+Array]
+ - {Task: Retrieve the Value for an Attribute Name}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Retrieve+the+Value+for+an+Attribute+Name]
+ - {Task: Retrieve the Attribute Value for a Name and Namespace}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Retrieve+the+Attribute+Value+for+a+Name+and+Namespace]
+ - {Task: Delete an Attribute}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Delete+an+Attribute]
+ - {Task: Determine Whether the Element Has Attributes}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Determine+Whether+the+Element+Has+Attributes]
+- {Children}[../../tasks/rdoc/element_rdoc.html#label-Children]
+ - {Task: Create and Add an Element}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Create+and+Add+an+Element]
+ - {Task: Add an Existing Element}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Add+an+Existing+Element]
+ - {Task: Create and Add an Element with Attributes}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Create+and+Add+an+Element+with+Attributes]
+ - {Task: Add an Existing Element with Added Attributes}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Add+an+Existing+Element+with+Added+Attributes]
+ - {Task: Delete a Specified Element}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Delete+a+Specified+Element]
+ - {Task: Delete an Element by Index}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Delete+an+Element+by+Index]
+ - {Task: Delete an Element by XPath}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Delete+an+Element+by+XPath]
+ - {Task: Determine Whether Element Children}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Determine+Whether+Element+Children]
+ - {Task: Get Element Descendants by XPath}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Get+Element+Descendants+by+XPath]
+ - {Task: Get Next Element Sibling}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Get+Next+Element+Sibling]
+ - {Task: Get Previous Element Sibling}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Get+Previous+Element+Sibling]
+ - {Task: Add a Text Node}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Add+a+Text+Node]
+ - {Task: Replace the First Text Node}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Replace+the+First+Text+Node]
+ - {Task: Remove the First Text Node}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Remove+the+First+Text+Node]
+ - {Task: Retrieve the First Text Node}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Retrieve+the+First+Text+Node]
+ - {Task: Retrieve a Specific Text Node}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Retrieve+a+Specific+Text+Node]
+ - {Task: Determine Whether the Element has Text Nodes}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Determine+Whether+the+Element+has+Text+Nodes]
+ - {Task: Get the Child at a Given Index}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Get+the+Child+at+a+Given+Index]
+ - {Task: Get All CDATA Children}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Get+All+CDATA+Children]
+ - {Task: Get All Comment Children}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Get+All+Comment+Children]
+ - {Task: Get All Processing Instruction Children}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Get+All+Processing+Instruction+Children]
+ - {Task: Get All Text Children}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Get+All+Text+Children]
+- {Namespaces}[../../tasks/rdoc/element_rdoc.html#label-Namespaces]
+ - {Task: Add a Namespace}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Add+a+Namespace]
+ - {Task: Delete the Default Namespace}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Delete+the+Default+Namespace]
+ - {Task: Delete a Specific Namespace}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Delete+a+Specific+Namespace]
+ - {Task: Get a Namespace URI}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Get+a+Namespace+URI]
+ - {Task: Retrieve Namespaces}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Retrieve+Namespaces]
+ - {Task: Retrieve Namespace Prefixes}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Retrieve+Namespace+Prefixes]
+- {Iteration}[../../tasks/rdoc/element_rdoc.html#label-Iteration]
+ - {Task: Iterate Over Elements}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Iterate+Over+Elements]
+ - {Task: Iterate Over Elements Having a Specified Attribute}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Iterate+Over+Elements+Having+a+Specified+Attribute]
+ - {Task: Iterate Over Elements Having a Specified Attribute and Value}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Iterate+Over+Elements+Having+a+Specified+Attribute+and+Value]
+ - {Task: Iterate Over Elements Having Specified Text}[../../tasks/rdoc/element_rdoc.html#label-Task-3A+Iterate+Over+Elements+Having+Specified+Text]
+- {Context}[../../tasks/rdoc/element_rdoc.html#label-Context]
+- {Other Getters}[../../tasks/rdoc/element_rdoc.html#label-Other+Getters]
+
+=== {Node}[../../tasks/rdoc/node_rdoc.html]
+- {Siblings}[../../tasks/rdoc/node_rdoc.html#label-Siblings]
+ - {Task: Find Previous Sibling}[../../tasks/rdoc/node_rdoc.html#label-Task-3A+Find+Previous+Sibling]
+ - {Task: Find Next Sibling}[../../tasks/rdoc/node_rdoc.html#label-Task-3A+Find+Next+Sibling]
+- {Position}[../../tasks/rdoc/node_rdoc.html#label-Position]
+ - {Task: Find Own Index Among Siblings}[../../tasks/rdoc/node_rdoc.html#label-Task-3A+Find+Own+Index+Among+Siblings]
+- {Recursive Traversal}[../../tasks/rdoc/node_rdoc.html#label-Recursive+Traversal]
+ - {Task: Traverse Each Recursively}[../../tasks/rdoc/node_rdoc.html#label-Task-3A+Traverse+Each+Recursively]
+- {Recursive Search}[../../tasks/rdoc/node_rdoc.html#label-Recursive+Search]
+ - {Task: Traverse Each Recursively}[../../tasks/rdoc/node_rdoc.html#label-Task-3A+Traverse+Each+Recursively]
+- {Representation}[../../tasks/rdoc/node_rdoc.html#label-Representation]
+ - {Task: Represent a String}[../../tasks/rdoc/node_rdoc.html#label-Task-3A+Represent+a+String]
+- {Parent?}[../../tasks/rdoc/node_rdoc.html#label-Parent-3F]
+ - {Task: Determine Whether the Node is a Parent}[../../tasks/rdoc/node_rdoc.html#label-Task-3A+Determine+Whether+the+Node+is+a+Parent]
+
+=== {Parent}[../../tasks/rdoc/parent_rdoc.html]
+- {Queries}[../../tasks/rdoc/parent_rdoc.html#label-Queries]
+ - {Task: Get the Count of Children}[../../tasks/rdoc/parent_rdoc.html#label-Task-3A+Get+the+Count+of+Children]
+ - {Task: Get the Child at a Given Index}[../../tasks/rdoc/parent_rdoc.html#label-Task-3A+Get+the+Child+at+a+Given+Index]
+ - {Task: Get the Index of a Given Child}[../../tasks/rdoc/parent_rdoc.html#label-Task-3A+Get+the+Index+of+a+Given+Child]
+ - {Task: Get the Children}[../../tasks/rdoc/parent_rdoc.html#label-Task-3A+Get+the+Children]
+ - {Task: Determine Whether the Node is a Parent}[../../tasks/rdoc/parent_rdoc.html#label-Task-3A+Determine+Whether+the+Node+is+a+Parent]
+- {Additions}[../../tasks/rdoc/parent_rdoc.html#label-Additions]
+ - {Task: Add a Child at the Beginning}[../../tasks/rdoc/parent_rdoc.html#label-Task-3A+Add+a+Child+at+the+Beginning]
+ - {Task: Add a Child at the End}[../../tasks/rdoc/parent_rdoc.html#label-Task-3A+Add+a+Child+at+the+End]
+ - {Task: Replace a Child with Another Child}[../../tasks/rdoc/parent_rdoc.html#label-Task-3A+Replace+a+Child+with+Another+Child]
+ - {Task: Replace Multiple Children with Another Child}[../../tasks/rdoc/parent_rdoc.html#label-Task-3A+Replace+Multiple+Children+with+Another+Child]
+ - {Task: Insert Child Before a Given Child}[../../tasks/rdoc/parent_rdoc.html#label-Task-3A+Insert+Child+Before+a+Given+Child]
+ - {Task: Insert Child After a Given Child}[../../tasks/rdoc/parent_rdoc.html#label-Task-3A+Insert+Child+After+a+Given+Child]
+- {Deletions}[../../tasks/rdoc/parent_rdoc.html#label-Deletions]
+ - {Task: Remove a Given Child}[../../tasks/rdoc/parent_rdoc.html#label-Task-3A+Remove+a+Given+Child]
+ - {Task: Remove the Child at a Specified Offset}[../../tasks/rdoc/parent_rdoc.html#label-Task-3A+Remove+the+Child+at+a+Specified+Offset]
+ - {Task: Remove Children That Meet Specified Criteria}[../../tasks/rdoc/parent_rdoc.html#label-Task-3A+Remove+Children+That+Meet+Specified+Criteria]
+- {Iterations}[../../tasks/rdoc/parent_rdoc.html#label-Iterations]
+ - {Task: Iterate Over Children}[../../tasks/rdoc/parent_rdoc.html#label-Task-3A+Iterate+Over+Children]
+ - {Task: Iterate Over Child Indexes}[../../tasks/rdoc/parent_rdoc.html#label-Task-3A+Iterate+Over+Child+Indexes]
+- {Clones}[../../tasks/rdoc/parent_rdoc.html#label-Clones]
+ - {Task: Clone Deeply}[../../tasks/rdoc/parent_rdoc.html#label-Task-3A+Clone+Deeply]
+
diff --git a/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/node_toc.rdoc b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/node_toc.rdoc
new file mode 100644
index 0000000..d9114fa
--- /dev/null
+++ b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/node_toc.rdoc
@@ -0,0 +1,16 @@
+Tasks on this page:
+
+- {Siblings}[#label-Siblings]
+ - {Task: Find Previous Sibling}[#label-Task-3A+Find+Previous+Sibling]
+ - {Task: Find Next Sibling}[#label-Task-3A+Find+Next+Sibling]
+- {Position}[#label-Position]
+ - {Task: Find Own Index Among Siblings}[#label-Task-3A+Find+Own+Index+Among+Siblings]
+- {Recursive Traversal}[#label-Recursive+Traversal]
+ - {Task: Traverse Each Recursively}[#label-Task-3A+Traverse+Each+Recursively]
+- {Recursive Search}[#label-Recursive+Search]
+ - {Task: Traverse Each Recursively}[#label-Task-3A+Traverse+Each+Recursively]
+- {Representation}[#label-Representation]
+ - {Task: Represent a String}[#label-Task-3A+Represent+a+String]
+- {Parent?}[#label-Parent-3F]
+ - {Task: Determine Whether the Node is a Parent}[#label-Task-3A+Determine+Whether+the+Node+is+a+Parent]
+
diff --git a/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/parent_toc.rdoc b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/parent_toc.rdoc
new file mode 100644
index 0000000..68fc0b7
--- /dev/null
+++ b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/parent_toc.rdoc
@@ -0,0 +1,25 @@
+Tasks on this page:
+
+- {Queries}[#label-Queries]
+ - {Task: Get the Count of Children}[#label-Task-3A+Get+the+Count+of+Children]
+ - {Task: Get the Child at a Given Index}[#label-Task-3A+Get+the+Child+at+a+Given+Index]
+ - {Task: Get the Index of a Given Child}[#label-Task-3A+Get+the+Index+of+a+Given+Child]
+ - {Task: Get the Children}[#label-Task-3A+Get+the+Children]
+ - {Task: Determine Whether the Node is a Parent}[#label-Task-3A+Determine+Whether+the+Node+is+a+Parent]
+- {Additions}[#label-Additions]
+ - {Task: Add a Child at the Beginning}[#label-Task-3A+Add+a+Child+at+the+Beginning]
+ - {Task: Add a Child at the End}[#label-Task-3A+Add+a+Child+at+the+End]
+ - {Task: Replace a Child with Another Child}[#label-Task-3A+Replace+a+Child+with+Another+Child]
+ - {Task: Replace Multiple Children with Another Child}[#label-Task-3A+Replace+Multiple+Children+with+Another+Child]
+ - {Task: Insert Child Before a Given Child}[#label-Task-3A+Insert+Child+Before+a+Given+Child]
+ - {Task: Insert Child After a Given Child}[#label-Task-3A+Insert+Child+After+a+Given+Child]
+- {Deletions}[#label-Deletions]
+ - {Task: Remove a Given Child}[#label-Task-3A+Remove+a+Given+Child]
+ - {Task: Remove the Child at a Specified Offset}[#label-Task-3A+Remove+the+Child+at+a+Specified+Offset]
+ - {Task: Remove Children That Meet Specified Criteria}[#label-Task-3A+Remove+Children+That+Meet+Specified+Criteria]
+- {Iterations}[#label-Iterations]
+ - {Task: Iterate Over Children}[#label-Task-3A+Iterate+Over+Children]
+ - {Task: Iterate Over Child Indexes}[#label-Task-3A+Iterate+Over+Child+Indexes]
+- {Clones}[#label-Clones]
+ - {Task: Clone Deeply}[#label-Task-3A+Clone+Deeply]
+
diff --git a/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tutorial.rdoc b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tutorial.rdoc
new file mode 100644
index 0000000..c85a70d
--- /dev/null
+++ b/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.4/doc/rexml/tutorial.rdoc
@@ -0,0 +1,1358 @@
+= \REXML Tutorial
+
+== Why \REXML?
+
+- Ruby's \REXML library is part of the Ruby distribution,
+ so using it requires no gem installations.
+- \REXML is fully maintained.
+- \REXML is mature, having been in use for long years.
+
+== To Include, or Not to Include?
+
+REXML is a module.
+To use it, you must require it:
+
+ require 'rexml' # => true
+
+If you do not also include it, you must fully qualify references to REXML:
+
+ REXML::Document # => REXML::Document
+
+If you also include the module, you may optionally omit <tt>REXML::</tt>:
+
+ include REXML
+ Document # => REXML::Document
+ REXML::Document # => REXML::Document
+
+== Preliminaries
+
+All examples here assume that the following code has been executed:
+
+ require 'rexml'
+ include REXML
+
+The source XML for many examples here is from file
+{books.xml}[https://www.w3schools.com/xml/books.xml] at w3schools.com.
+You may find it convenient to open that page in a new tab
+(Ctrl-click in some browsers).
+
+Note that your browser may display the XML with modified whitespace
+and without the XML declaration, which in this case is:
+
+ <?xml version="1.0" encoding="UTF-8"?>
+
+For convenience, we capture the XML into a string variable:
+
+ require 'open-uri'
+ source_string = URI.open('https://www.w3schools.com/xml/books.xml').read
+
+And into a file:
+
+ File.write('source_file.xml', source_string)
+
+Throughout these examples, variable +doc+ will hold only the document
+derived from these sources:
+
+ doc = Document.new(source_string)
+
+== Parsing \XML \Source
+
+=== Parsing a Document
+
+Use method REXML::Document::new to parse XML source.
+
+The source may be a string:
+
+ doc = Document.new(source_string)
+
+Or an \IO stream:
+
+ doc = File.open('source_file.xml', 'r') do |io|
+ Document.new(io)
+ end
+
+Method <tt>URI.open</tt> returns a StringIO object,
+so the source can be from a web page:
+
+ require 'open-uri'
+ io = URI.open("https://www.w3schools.com/xml/books.xml")
+ io.class # => StringIO
+ doc = Document.new(io)
+
+For any of these sources, the returned object is an REXML::Document:
+
+ doc # => <UNDEFINED> ... </>
+ doc.class # => REXML::Document
+
+Note: <tt>'UNDEFINED'</tt> is the "name" displayed for a document,
+even though <tt>doc.name</tt> returns an empty string <tt>""</tt>.
+
+A parsed document may produce \REXML objects of many classes,
+but the two that are likely to be of greatest interest are
+REXML::Document and REXML::Element.
+These two classes are covered in great detail in this tutorial.
+
+=== Context (Parsing Options)
+
+The context for parsing a document is a hash that influences
+the way the XML is read and stored.
+
+The context entries are:
+
+- +:respect_whitespace+: controls treatment of whitespace.
+- +:compress_whitespace+: determines whether whitespace is compressed.
+- +:ignore_whitespace_nodes+: determines whether whitespace-only nodes are to be ignored.
+- +:raw+: controls treatment of special characters and entities.
+
+See {Element Context}[../context_rdoc.html].
+
+== Exploring the Document
+
+An REXML::Document object represents an XML document.
+
+The object inherits from its ancestor classes:
+
+- REXML::Child (includes module REXML::Node)
+ - REXML::Parent (includes module {Enumerable}[rdoc-ref:Enumerable]).
+ - REXML::Element (includes module REXML::Namespace).
+ - REXML::Document
+
+This section covers only those properties and methods that are unique to a document
+(that is, not inherited or included).
+
+=== Document Properties
+
+A document has several properties (other than its children);
+
+- Document type.
+- Node type.
+- Name.
+- Document.
+- XPath
+
+[Document Type]
+
+ A document may have a document type:
+
+ my_xml = '<!DOCTYPE foo>'
+ my_doc = Document.new(my_xml)
+ doc_type = my_doc.doctype
+ doc_type.class # => REXML::DocType
+ doc_type.to_s # => "<!DOCTYPE foo>"
+
+[Node Type]
+
+ A document also has a node type (always +:document+):
+
+ doc.node_type # => :document
+
+[Name]
+
+ A document has a name (always an empty string):
+
+ doc.name # => ""
+
+[Document]
+
+ \Method REXML::Document#document returns +self+:
+
+ doc.document == doc # => true
+
+ An object of a different class (\REXML::Element or \REXML::Child)
+ may have a document, which is the document to which the object belongs;
+ if so, that document will be an \REXML::Document object.
+
+ doc.root.document.class # => REXML::Document
+
+[XPath]
+
+ \method REXML::Element#xpath returns the string xpath to the element,
+ relative to its most distant ancestor:
+
+ doc.root.class # => REXML::Element
+ doc.root.xpath # => "/bookstore"
+ doc.root.texts.first # => "\n\n"
+ doc.root.texts.first.xpath # => "/bookstore/text()"
+
+ If there is no ancestor, returns the expanded name of the element:
+
+ Element.new('foo').xpath # => "foo"
+
+=== Document Children
+
+A document may have children of these types:
+
+- XML declaration.
+- Root element.
+- Text.
+- Processing instructions.
+- Comments.
+- CDATA.
+
+[XML Declaration]
+
+ A document may an XML declaration, which is stored as an REXML::XMLDecl object:
+
+ doc.xml_decl # => <?xml ... ?>
+ doc.xml_decl.class # => REXML::XMLDecl
+
+ Document.new('').xml_decl # => <?xml ... ?>
+
+ my_xml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>"'
+ my_doc = Document.new(my_xml)
+ xml_decl = my_doc.xml_decl
+ xml_decl.to_s # => "<?xml version='1.0' encoding='UTF-8' standalone="yes"?>"
+
+ The version, encoding, and stand-alone values may be retrieved separately:
+
+ my_doc.version # => "1.0"
+ my_doc.encoding # => "UTF-8"
+ my_doc.stand_alone? # => "yes"
+
+[Root Element]
+
+ A document may have a single element child, called the _root_ _element_,
+ which is stored as an REXML::Element object;
+ it may be retrieved with method +root+:
+
+ doc.root # => <bookstore> ... </>
+ doc.root.class # => REXML::Element
+
+ Document.new('').root # => nil
+
+[Text]
+
+ A document may have text passages, each of which is stored
+ as an REXML::Text object:
+
+ doc.texts.each {|t| p [t.class, t] }
+
+ Output:
+
+ [REXML::Text, "\n"]
+
+[Processing Instructions]
+
+ A document may have processing instructions, which are stored
+ as REXML::Instruction objects:
+
+
+
+ Output:
+
+ [REXML::Instruction, <?p-i my-application ...?>]
+ [REXML::Instruction, <?p-i my-application ...?>]
+
+[Comments]
+
+ A document may have comments, which are stored
+ as REXML::Comment objects:
+
+ my_xml = <<-EOT
+ <!--foo-->
+ <!--bar-->
+ EOT
+ my_doc = Document.new(my_xml)
+ my_doc.comments.each {|c| p [c.class, c] }
+
+ Output:
+
+ [REXML::Comment, #<REXML::Comment: @parent=<UNDEFINED> ... </>, @string="foo">]
+ [REXML::Comment, #<REXML::Comment: @parent=<UNDEFINED> ... </>, @string="bar">]
+
+[CDATA]
+
+ A document may have CDATA entries, which are stored
+ as REXML::CData objects:
+
+ my_xml = <<-EOT
+ <![CDATA[foo]]>
+ <![CDATA[bar]]>
+ EOT
+ my_doc = Document.new(my_xml)
+ my_doc.cdatas.each {|cd| p [cd.class, cd] }
+
+ Output:
+
+ [REXML::CData, "foo"]
+ [REXML::CData, "bar"]
+
+The payload of a document is a tree of nodes, descending from the root element:
+
+ doc.root.children.each do |child|
+ p [child, child.class]
+ end
+
+Output:
+
+ [REXML::Text, "\n\n"]
+ [REXML::Element, <book category='cooking'> ... </>]
+ [REXML::Text, "\n\n"]
+ [REXML::Element, <book category='children'> ... </>]
+ [REXML::Text, "\n\n"]
+ [REXML::Element, <book category='web'> ... </>]
+ [REXML::Text, "\n\n"]
+ [REXML::Element, <book category='web' cover='paperback'> ... </>]
+ [REXML::Text, "\n\n"]
+
+== Exploring an Element
+
+An REXML::Element object represents an XML element.
+
+The object inherits from its ancestor classes:
+
+- REXML::Child (includes module REXML::Node)
+ - REXML::Parent (includes module {Enumerable}[rdoc-ref:Enumerable]).
+ - REXML::Element (includes module REXML::Namespace).
+
+This section covers methods:
+
+- Defined in REXML::Element itself.
+- Inherited from REXML::Parent and REXML::Child.
+- Included from REXML::Node.
+
+=== Inside the Element
+
+[Brief String Representation]
+
+ Use method REXML::Element#inspect to retrieve a brief string representation.
+
+ doc.root.inspect # => "<bookstore> ... </>"
+
+ The ellipsis (<tt>...</tt>) indicates that the element has children.
+ When there are no children, the ellipsis is omitted:
+
+ Element.new('foo').inspect # => "<foo/>"
+
+ If the element has attributes, those are also included:
+
+ doc.root.elements.first.inspect # => "<book category='cooking'> ... </>"
+
+[Extended String Representation]
+
+ Use inherited method REXML::Child.bytes to retrieve an extended
+ string representation.
+
+ doc.root.bytes # => "<bookstore>\n\n<book category='cooking'>\n <title lang='en'>Everyday Italian</title>\n <author>Giada De Laurentiis</author>\n <year>2005</year>\n <price>30.00</price>\n</book>\n\n<book category='children'>\n <title lang='en'>Harry Potter</title>\n <author>J K. Rowling</author>\n <year>2005</year>\n <price>29.99</price>\n</book>\n\n<book category='web'>\n <title lang='en'>XQuery Kick Start</title>\n <author>James McGovern</author>\n <author>Per Bothner</author>\n <author>Kurt Cagle</author>\n <author>James Linn</author>\n <author>Vaidyanathan Nagarajan</author>\n <year>2003</year>\n <price>49.99</price>\n</book>\n\n<book category='web' cover='paperback'>\n <title lang='en'>Learning XML</title>\n <author>Erik T. Ray</author>\n <year>2003</year>\n <price>39.95</price>\n</book>\n\n</bookstore>"
+
+[Node Type]
+
+ Use method REXML::Element#node_type to retrieve the node type (always +:element+):
+
+ doc.root.node_type # => :element
+
+[Raw Mode]
+
+ Use method REXML::Element#raw to retrieve whether (+true+ or +nil+)
+ raw mode is set.
+
+ doc.root.raw # => nil
+
+[Context]
+
+ Use method REXML::Element#context to retrieve the context hash
+ (see {Element Context}[../context_rdoc.html]):
+
+ doc.root.context # => {}
+
+=== Relationships
+
+An element may have:
+
+- Ancestors.
+- Siblings.
+- Children.
+
+==== Ancestors
+
+[Containing Document]
+
+ Use method REXML::Element#document to retrieve the containing document, if any:
+
+ ele = doc.root.elements.first # => <book category='cooking'> ... </>
+ ele.document # => <UNDEFINED> ... </>
+ ele = Element.new('foo') # => <foo/>
+ ele.document # => nil
+
+[Root Element]
+
+ Use method REXML::Element#root to retrieve the root element:
+
+ ele = doc.root.elements.first # => <book category='cooking'> ... </>
+ ele.root # => <bookstore> ... </>
+ ele = Element.new('foo') # => <foo/>
+ ele.root # => <foo/>
+
+[Root Node]
+
+ Use method REXML::Element#root_node to retrieve the most distant ancestor,
+ which is the containing document, if any, otherwise the root element:
+
+ ele = doc.root.elements.first # => <book category='cooking'> ... </>
+ ele.root_node # => <UNDEFINED> ... </>
+ ele = Element.new('foo') # => <foo/>
+ ele.root_node # => <foo/>
+
+[Parent]
+
+ Use inherited method REXML::Child#parent to retrieve the parent
+
+ ele = doc.root # => <bookstore> ... </>
+ ele.parent # => <UNDEFINED> ... </>
+ ele = doc.root.elements.first # => <book category='cooking'> ... </>
+ ele.parent # => <bookstore> ... </>
+
+ Use included method REXML::Node#index_in_parent to retrieve the index
+ of the element among all of its parents children (not just the element children).
+ Note that while the index for <tt>doc.root.elements[n]</tt> is 1-based,
+ the returned index is 0-based.
+
+ doc.root.children # =>
+ # ["\n\n",
+ # <book category='cooking'> ... </>,
+ # "\n\n",
+ # <book category='children'> ... </>,
+ # "\n\n",
+ # <book category='web'> ... </>,
+ # "\n\n",
+ # <book category='web' cover='paperback'> ... </>,
+ # "\n\n"]
+ ele = doc.root.elements[1] # => <book category='cooking'> ... </>
+ ele.index_in_parent # => 2
+ ele = doc.root.elements[2] # => <book category='children'> ... </>
+ ele.index_in_parent# => 4
+
+==== Siblings
+
+[Next Element]
+
+ Use method REXML::Element#next_element to retrieve the first following
+ sibling that is itself an element (+nil+ if there is none):
+
+ ele = doc.root.elements[1]
+ while ele do
+ p [ele.class, ele]
+ ele = ele.next_element
+ end
+ p ele
+
+ Output:
+
+ [REXML::Element, <book category='cooking'> ... </>]
+ [REXML::Element, <book category='children'> ... </>]
+ [REXML::Element, <book category='web'> ... </>]
+ [REXML::Element, <book category='web' cover='paperback'> ... </>]
+
+[Previous Element]
+
+ Use method REXML::Element#previous_element to retrieve the first preceding
+ sibling that is itself an element (+nil+ if there is none):
+
+ ele = doc.root.elements[4]
+ while ele do
+ p [ele.class, ele]
+ ele = ele.previous_element
+ end
+ p ele
+
+ Output:
+
+ [REXML::Element, <book category='web' cover='paperback'> ... </>]
+ [REXML::Element, <book category='web'> ... </>]
+ [REXML::Element, <book category='children'> ... </>]
+ [REXML::Element, <book category='cooking'> ... </>]
+
+[Next Node]
+
+ Use included method REXML::Node.next_sibling_node
+ (or its alias <tt>next_sibling</tt>) to retrieve the first following node
+ regardless of its class:
+
+ node = doc.root.children[0]
+ while node do
+ p [node.class, node]
+ node = node.next_sibling
+ end
+ p node
+
+ Output:
+
+ [REXML::Text, "\n\n"]
+ [REXML::Element, <book category='cooking'> ... </>]
+ [REXML::Text, "\n\n"]
+ [REXML::Element, <book category='children'> ... </>]
+ [REXML::Text, "\n\n"]
+ [REXML::Element, <book category='web'> ... </>]
+ [REXML::Text, "\n\n"]
+ [REXML::Element, <book category='web' cover='paperback'> ... </>]
+ [REXML::Text, "\n\n"]
+
+[Previous Node]
+
+ Use included method REXML::Node.previous_sibling_node
+ (or its alias <tt>previous_sibling</tt>) to retrieve the first preceding node
+ regardless of its class:
+
+ node = doc.root.children[-1]
+ while node do
+ p [node.class, node]
+ node = node.previous_sibling
+ end
+ p node
+
+ Output:
+
+ [REXML::Text, "\n\n"]
+ [REXML::Element, <book category='web' cover='paperback'> ... </>]
+ [REXML::Text, "\n\n"]
+ [REXML::Element, <book category='web'> ... </>]
+ [REXML::Text, "\n\n"]
+ [REXML::Element, <book category='children'> ... </>]
+ [REXML::Text, "\n\n"]
+ [REXML::Element, <book category='cooking'> ... </>]
+ [REXML::Text, "\n\n"]
+
+==== Children
+
+[Child Count]
+
+ Use inherited method REXML::Parent.size to retrieve the count
+ of nodes (of all types) in the element:
+
+ doc.root.size # => 9
+
+[Child Nodes]
+
+ Use inherited method REXML::Parent.children to retrieve an array
+ of the child nodes (of all types):
+
+ doc.root.children # =>
+ # ["\n\n",
+ # <book category='cooking'> ... </>,
+ # "\n\n",
+ # <book category='children'> ... </>,
+ # "\n\n",
+ # <book category='web'> ... </>,
+ # "\n\n",
+ # <book category='web' cover='paperback'> ... </>,
+ # "\n\n"]
+
+[Child at Index]
+
+ Use method REXML::Element#[] to retrieve the child at a given numerical index,
+ or +nil+ if there is no such child:
+
+ doc.root[0] # => "\n\n"
+ doc.root[1] # => <book category='cooking'> ... </>
+ doc.root[7] # => <book category='web' cover='paperback'> ... </>
+ doc.root[8] # => "\n\n"
+
+ doc.root[-1] # => "\n\n"
+ doc.root[-2] # => <book category='web' cover='paperback'> ... </>
+
+ doc.root[50] # => nil
+
+[Index of Child]
+
+ Use method REXML::Parent#index to retrieve the zero-based child index
+ of the given object, or <tt>#size - 1</tt> if there is no such child:
+
+ ele = doc.root # => <bookstore> ... </>
+ ele.index(ele[0]) # => 0
+ ele.index(ele[1]) # => 1
+ ele.index(ele[7]) # => 7
+ ele.index(ele[8]) # => 8
+
+ ele.index(ele[-1]) # => 8
+ ele.index(ele[-2]) # => 7
+
+ ele.index(ele[50]) # => 8
+
+[Element Children]
+
+ Use method REXML::Element#has_elements? to retrieve whether the element
+ has element children:
+
+ doc.root.has_elements? # => true
+ REXML::Element.new('foo').has_elements? # => false
+
+ Use method REXML::Element#elements to retrieve the REXML::Elements object
+ containing the element children:
+
+ eles = doc.root.elements
+ eles # => #<REXML::Elements:0x000001ee2848e960 @element=<bookstore> ... </>>
+ eles.size # => 4
+ eles.each {|e| p [e.class], e }
+
+ Output:
+
+ [<book category='cooking'> ... </>,
+ <book category='children'> ... </>,
+ <book category='web'> ... </>,
+ <book category='web' cover='paperback'> ... </>
+ ]
+
+Note that while in this example, all the element children of the root element are
+elements of the same name, <tt>'book'</tt>, that is not true of all documents;
+a root element (or any other element) may have any mixture of child elements.
+
+[CDATA Children]
+
+ Use method REXML::Element#cdatas to retrieve a frozen array of CDATA children:
+
+ my_xml = <<-EOT
+ <root>
+ <![CDATA[foo]]>
+ <![CDATA[bar]]>
+ </root>
+ EOT
+ my_doc = REXML::Document.new(my_xml)
+ cdatas my_doc.root.cdatas
+ cdatas.frozen? # => true
+ cdatas.map {|cd| cd.class } # => [REXML::CData, REXML::CData]
+
+[Comment Children]
+
+ Use method REXML::Element#comments to retrieve a frozen array of comment children:
+
+ my_xml = <<-EOT
+ <root>
+ <!--foo-->
+ <!--bar-->
+ </root>
+ EOT
+ my_doc = REXML::Document.new(my_xml)
+ comments = my_doc.root.comments
+ comments.frozen? # => true
+ comments.map {|c| c.class } # => [REXML::Comment, REXML::Comment]
+ comments.map {|c| c.to_s } # => ["foo", "bar"]
+
+[Processing Instruction Children]
+
+ Use method REXML::Element#instructions to retrieve a frozen array
+ of processing instruction children:
+
+ my_xml = <<-EOT
+ <root>
+ <?target0 foo?>
+ <?target1 bar?>
+ </root>
+ EOT
+ my_doc = REXML::Document.new(my_xml)
+ instrs = my_doc.root.instructions
+ instrs.frozen? # => true
+ instrs.map {|i| i.class } # => [REXML::Instruction, REXML::Instruction]
+ instrs.map {|i| i.to_s } # => ["<?target0 foo?>", "<?target1 bar?>"]
+
+[Text Children]
+
+ Use method REXML::Element#has_text? to retrieve whether the element
+ has text children:
+
+ doc.root.has_text? # => true
+ REXML::Element.new('foo').has_text? # => false
+
+ Use method REXML::Element#texts to retrieve a frozen array of text children:
+
+ my_xml = '<root><a/>text<b/>more<c/></root>'
+ my_doc = REXML::Document.new(my_xml)
+ texts = my_doc.root.texts
+ texts.frozen? # => true
+ texts.map {|t| t.class } # => [REXML::Text, REXML::Text]
+ texts.map {|t| t.to_s } # => ["text", "more"]
+
+[Parenthood]
+
+ Use inherited method REXML::Parent.parent? to retrieve whether the element is a parent;
+ always returns +true+; only REXML::Child#parent returns +false+.
+
+ doc.root.parent? # => true
+
+=== Element Attributes
+
+Use method REXML::Element#has_attributes? to return whether the element
+has attributes:
+
+ ele = doc.root # => <bookstore> ... </>
+ ele.has_attributes? # => false
+ ele = ele.elements.first # => <book category='cooking'> ... </>
+ ele.has_attributes? # => true
+
+Use method REXML::Element#attributes to return the hash
+containing the attributes for the element.
+Each hash key is a string attribute name;
+each hash value is an REXML::Attribute object.
+
+ ele = doc.root # => <bookstore> ... </>
+ attrs = ele.attributes # => {}
+
+ ele = ele.elements.first # => <book category='cooking'> ... </>
+ attrs = ele.attributes # => {"category"=>category='cooking'}
+ attrs.size # => 1
+ attr_name = attrs.keys.first # => "category"
+ attr_name.class # => String
+ attr_value = attrs.values.first # => category='cooking'
+ attr_value.class # => REXML::Attribute
+
+Use method REXML::Element#[] to retrieve the string value for a given attribute,
+which may be given as either a string or a symbol:
+
+ ele = doc.root.elements.first # => <book category='cooking'> ... </>
+ attr_value = ele['category'] # => "cooking"
+ attr_value.class # => String
+ ele['nosuch'] # => nil
+
+Use method REXML::Element#attribute to retrieve the value of a named attribute:
+
+ my_xml = "<root xmlns:a='a' a:x='a:x' x='x'/>"
+ my_doc = REXML::Document.new(my_xml)
+ my_doc.root.attribute("x") # => x='x'
+ my_doc.root.attribute("x", "a") # => a:x='a:x'
+
+== Whitespace
+
+Use method REXML::Element#ignore_whitespace_nodes to determine whether
+whitespace nodes were ignored when the XML was parsed;
+returns +true+ if so, +nil+ otherwise.
+
+Use method REXML::Element#whitespace to determine whether whitespace
+is respected for the element; returns +true+ if so, +false+ otherwise.
+
+== Namespaces
+
+Use method REXML::Element#namespace to retrieve the string namespace URI
+for the element, which may derive from one of its ancestors:
+
+ xml_string = <<-EOT
+ <root>
+ <a xmlns='1' xmlns:y='2'>
+ <b/>
+ <c xmlns:z='3'/>
+ </a>
+ </root>
+ EOT
+ d = Document.new(xml_string)
+ b = d.elements['//b']
+ b.namespace # => "1"
+ b.namespace('y') # => "2"
+ b.namespace('nosuch') # => nil
+
+Use method REXML::Element#namespaces to retrieve a hash of all defined namespaces
+in the element and its ancestors:
+
+ xml_string = <<-EOT
+ <root>
+ <a xmlns:x='1' xmlns:y='2'>
+ <b/>
+ <c xmlns:z='3'/>
+ </a>
+ </root>
+ EOT
+ d = Document.new(xml_string)
+ d.elements['//a'].namespaces # => {"x"=>"1", "y"=>"2"}
+ d.elements['//b'].namespaces # => {"x"=>"1", "y"=>"2"}
+ d.elements['//c'].namespaces # => {"x"=>"1", "y"=>"2", "z"=>"3"}
+
+Use method REXML::Element#prefixes to retrieve an array of the string prefixes (names)
+of all defined namespaces in the element and its ancestors:
+
+ xml_string = <<-EOT
+ <root>
+ <a xmlns:x='1' xmlns:y='2'>
+ <b/>
+ <c xmlns:z='3'/>
+ </a>
+ </root>
+ EOT
+ d = Document.new(xml_string, {compress_whitespace: :all})
+ d.elements['//a'].prefixes # => ["x", "y"]
+ d.elements['//b'].prefixes # => ["x", "y"]
+ d.elements['//c'].prefixes # => ["x", "y", "z"]
+
+== Traversing
+
+You can use certain methods to traverse children of the element.
+Each child that meets given criteria is yielded to the given block.
+
+[Traverse All Children]
+
+ Use inherited method REXML::Parent#each (or its alias #each_child) to traverse
+ all children of the element:
+
+ doc.root.each {|child| p [child.class, child] }
+
+ Output:
+
+ [REXML::Text, "\n\n"]
+ [REXML::Element, <book category='cooking'> ... </>]
+ [REXML::Text, "\n\n"]
+ [REXML::Element, <book category='children'> ... </>]
+ [REXML::Text, "\n\n"]
+ [REXML::Element, <book category='web'> ... </>]
+ [REXML::Text, "\n\n"]
+ [REXML::Element, <book category='web' cover='paperback'> ... </>]
+ [REXML::Text, "\n\n"]
+
+[Traverse Element Children]
+
+ Use method REXML::Element#each_element to traverse only the element children
+ of the element:
+
+ doc.root.each_element {|e| p [e.class, e] }
+
+ Output:
+
+ [REXML::Element, <book category='cooking'> ... </>]
+ [REXML::Element, <book category='children'> ... </>]
+ [REXML::Element, <book category='web'> ... </>]
+ [REXML::Element, <book category='web' cover='paperback'> ... </>]
+
+[Traverse Element Children with Attribute]
+
+ Use method REXML::Element#each_element_with_attribute with the single argument
+ +attr_name+ to traverse each element child that has the given attribute:
+
+ my_doc = Document.new '<a><b id="1"/><c id="2"/><d id="1"/><e/></a>'
+ my_doc.root.each_element_with_attribute('id') {|e| p [e.class, e] }
+
+ Output:
+
+ [REXML::Element, <b id='1'/>]
+ [REXML::Element, <c id='2'/>]
+ [REXML::Element, <d id='1'/>]
+
+ Use the same method with a second argument +value+ to traverse
+ each element child element that has the given attribute and value:
+
+ my_doc.root.each_element_with_attribute('id', '1') {|e| p [e.class, e] }
+
+ Output:
+
+ [REXML::Element, <b id='1'/>]
+ [REXML::Element, <d id='1'/>]
+
+ Use the same method with a third argument +max+ to traverse
+ no more than the given number of element children:
+
+ my_doc.root.each_element_with_attribute('id', '1', 1) {|e| p [e.class, e] }
+
+ Output:
+
+ [REXML::Element, <b id='1'/>]
+
+ Use the same method with a fourth argument +xpath+ to traverse
+ only those element children that match the given xpath:
+
+ my_doc.root.each_element_with_attribute('id', '1', 2, '//d') {|e| p [e.class, e] }
+
+ Output:
+
+ [REXML::Element, <d id='1'/>]
+
+[Traverse Element Children with Text]
+
+ Use method REXML::Element#each_element_with_text with no arguments
+ to traverse those element children that have text:
+
+ my_doc = Document.new '<a><b>b</b><c>b</c><d>d</d><e/></a>'
+ my_doc.root.each_element_with_text {|e| p [e.class, e] }
+
+ Output:
+
+ [REXML::Element, <b> ... </>]
+ [REXML::Element, <c> ... </>]
+ [REXML::Element, <d> ... </>]
+
+ Use the same method with the single argument +text+ to traverse
+ those element children that have exactly that text:
+
+ my_doc.root.each_element_with_text('b') {|e| p [e.class, e] }
+
+ Output:
+
+ [REXML::Element, <b> ... </>]
+ [REXML::Element, <c> ... </>]
+
+ Use the same method with additional second argument +max+ to traverse
+ no more than the given number of element children:
+
+ my_doc.root.each_element_with_text('b', 1) {|e| p [e.class, e] }
+
+ Output:
+
+ [REXML::Element, <b> ... </>]
+
+ Use the same method with additional third argument +xpath+ to traverse
+ only those element children that also match the given xpath:
+
+ my_doc.root.each_element_with_text('b', 2, '//c') {|e| p [e.class, e] }
+
+ Output:
+
+ [REXML::Element, <c> ... </>]
+
+[Traverse Element Children's Indexes]
+
+ Use inherited method REXML::Parent#each_index to traverse all children's indexes
+ (not just those of element children):
+
+ doc.root.each_index {|i| print i }
+
+ Output:
+
+ 012345678
+
+[Traverse Children Recursively]
+
+ Use included method REXML::Node#each_recursive to traverse all children recursively:
+
+ doc.root.each_recursive {|child| p [child.class, child] }
+
+ Output:
+
+ [REXML::Element, <book category='cooking'> ... </>]
+ [REXML::Element, <title lang='en'> ... </>]
+ [REXML::Element, <author> ... </>]
+ [REXML::Element, <year> ... </>]
+ [REXML::Element, <price> ... </>]
+ [REXML::Element, <book category='children'> ... </>]
+ [REXML::Element, <title lang='en'> ... </>]
+ [REXML::Element, <author> ... </>]
+ [REXML::Element, <year> ... </>]
+ [REXML::Element, <price> ... </>]
+ [REXML::Element, <book category='web'> ... </>]
+ [REXML::Element, <title lang='en'> ... </>]
+ [REXML::Element, <author> ... </>]
+ [REXML::Element, <author> ... </>]
+ [REXML::Element, <author> ... </>]
+ [REXML::Element, <author> ... </>]
+ [REXML::Element, <author> ... </>]
+ [REXML::Element, <year> ... </>]
+ [REXML::Element, <price> ... </>]
+ [REXML::Element, <book category='web' cover='paperback'> ... </>]
+ [REXML::Element, <title lang='en'> ... </>]
+ [REXML::Element, <author> ... </>]
+ [REXML::Element, <year> ... </>]
+ [REXML::Element, <price> ... </>]
+
+== Searching
+
+You can use certain methods to search among the descendants of an element.
+
+Use method REXML::Element#get_elements to retrieve all element children of the element
+that match the given +xpath+:
+
+ xml_string = <<-EOT
+ <root>
+ <a level='1'>
+ <a level='2'/>
+ </a>
+ </root>
+ EOT
+ d = Document.new(xml_string)
+ d.root.get_elements('//a') # => [<a level='1'> ... </>, <a level='2'/>]
+
+Use method REXML::Element#get_text with no argument to retrieve the first text node
+in the first child:
+
+ my_doc = Document.new "<p>some text <b>this is bold!</b> more text</p>"
+ text_node = my_doc.root.get_text
+ text_node.class # => REXML::Text
+ text_node.to_s # => "some text "
+
+Use the same method with argument +xpath+ to retrieve the first text node
+in the first child that matches the xpath:
+
+ my_doc.root.get_text(1) # => "this is bold!"
+
+Use method REXML::Element#text with no argument to retrieve the text
+from the first text node in the first child:
+
+ my_doc = Document.new "<p>some text <b>this is bold!</b> more text</p>"
+ text_node = my_doc.root.text
+ text_node.class # => String
+ text_node # => "some text "
+
+Use the same method with argument +xpath+ to retrieve the text from the first text node
+in the first child that matches the xpath:
+
+ my_doc.root.text(1) # => "this is bold!"
+
+Use included method REXML::Node#find_first_recursive
+to retrieve the first descendant element
+for which the given block returns a truthy value, or +nil+ if none:
+
+ doc.root.find_first_recursive do |ele|
+ ele.name == 'price'
+ end # => <price> ... </>
+ doc.root.find_first_recursive do |ele|
+ ele.name == 'nosuch'
+ end # => nil
+
+== Editing
+
+=== Editing a Document
+
+[Creating a Document]
+
+ Create a new document with method REXML::Document::new:
+
+ doc = Document.new(source_string)
+ empty_doc = REXML::Document.new
+
+[Adding to the Document]
+
+ Add an XML declaration with method REXML::Document#add
+ and an argument of type REXML::XMLDecl:
+
+ my_doc = Document.new
+ my_doc.xml_decl.to_s # => ""
+ my_doc.add(XMLDecl.new('2.0'))
+ my_doc.xml_decl.to_s # => "<?xml version='2.0'?>"
+
+ Add a document type with method REXML::Document#add
+ and an argument of type REXML::DocType:
+
+ my_doc = Document.new
+ my_doc.doctype.to_s # => ""
+ my_doc.add(DocType.new('foo'))
+ my_doc.doctype.to_s # => "<!DOCTYPE foo>"
+
+ Add a node of any other REXML type with method REXML::Document#add and an argument
+ that is not of type REXML::XMLDecl or REXML::DocType:
+
+ my_doc = Document.new
+ my_doc.add(Element.new('foo'))
+ my_doc.to_s # => "<foo/>"
+
+ Add an existing element as the root element with method REXML::Document#add_element:
+
+ ele = Element.new('foo')
+ my_doc = Document.new
+ my_doc.add_element(ele)
+ my_doc.root # => <foo/>
+
+ Create and add an element as the root element with method REXML::Document#add_element:
+
+ my_doc = Document.new
+ my_doc.add_element('foo')
+ my_doc.root # => <foo/>
+
+=== Editing an Element
+
+==== Creating an Element
+
+Create a new element with method REXML::Element::new:
+
+ ele = Element.new('foo') # => <foo/>
+
+==== Setting Element Properties
+
+Set the context for an element with method REXML::Element#context=
+(see {Element Context}[../context_rdoc.html]):
+
+ ele.context # => nil
+ ele.context = {ignore_whitespace_nodes: :all}
+ ele.context # => {:ignore_whitespace_nodes=>:all}
+
+Set the parent for an element with inherited method REXML::Child#parent=
+
+ ele.parent # => nil
+ ele.parent = Element.new('bar')
+ ele.parent # => <bar/>
+
+Set the text for an element with method REXML::Element#text=:
+
+ ele.text # => nil
+ ele.text = 'bar'
+ ele.text # => "bar"
+
+==== Adding to an Element
+
+Add a node as the last child with inherited method REXML::Parent#add (or its alias #push):
+
+ ele = Element.new('foo') # => <foo/>
+ ele.push(Text.new('bar'))
+ ele.push(Element.new('baz'))
+ ele.children # => ["bar", <baz/>]
+
+Add a node as the first child with inherited method REXML::Parent#unshift:
+
+ ele = Element.new('foo') # => <foo/>
+ ele.unshift(Element.new('bar'))
+ ele.unshift(Text.new('baz'))
+ ele.children # => ["bar", <baz/>]
+
+Add an element as the last child with method REXML::Element#add_element:
+
+ ele = Element.new('foo') # => <foo/>
+ ele.add_element('bar')
+ ele.add_element(Element.new('baz'))
+ ele.children # => [<bar/>, <baz/>]
+
+Add a text node as the last child with method REXML::Element#add_text:
+
+ ele = Element.new('foo') # => <foo/>
+ ele.add_text('bar')
+ ele.add_text(Text.new('baz'))
+ ele.children # => ["bar", "baz"]
+
+Insert a node before a given node with method REXML::Parent#insert_before:
+
+ ele = Element.new('foo') # => <foo/>
+ ele.add_text('bar')
+ ele.add_text(Text.new('baz'))
+ ele.children # => ["bar", "baz"]
+ target = ele[1] # => "baz"
+ ele.insert_before(target, Text.new('bat'))
+ ele.children # => ["bar", "bat", "baz"]
+
+Insert a node after a given node with method REXML::Parent#insert_after:
+
+ ele = Element.new('foo') # => <foo/>
+ ele.add_text('bar')
+ ele.add_text(Text.new('baz'))
+ ele.children # => ["bar", "baz"]
+ target = ele[0] # => "bar"
+ ele.insert_after(target, Text.new('bat'))
+ ele.children # => ["bar", "bat", "baz"]
+
+Add an attribute with method REXML::Element#add_attribute:
+
+ ele = Element.new('foo') # => <foo/>
+ ele.add_attribute('bar', 'baz')
+ ele.add_attribute(Attribute.new('bat', 'bam'))
+ ele.attributes # => {"bar"=>bar='baz', "bat"=>bat='bam'}
+
+Add multiple attributes with method REXML::Element#add_attributes:
+
+ ele = Element.new('foo') # => <foo/>
+ ele.add_attributes({'bar' => 'baz', 'bat' => 'bam'})
+ ele.add_attributes([['ban', 'bap'], ['bah', 'bad']])
+ ele.attributes # => {"bar"=>bar='baz', "bat"=>bat='bam', "ban"=>ban='bap', "bah"=>bah='bad'}
+
+Add a namespace with method REXML::Element#add_namespace:
+
+ ele = Element.new('foo') # => <foo/>
+ ele.add_namespace('bar')
+ ele.add_namespace('baz', 'bat')
+ ele.namespaces # => {"xmlns"=>"bar", "baz"=>"bat"}
+
+==== Deleting from an Element
+
+Delete a specific child object with inherited method REXML::Parent#delete:
+
+ ele = Element.new('foo') # => <foo/>
+ ele.add_element('bar')
+ ele.add_text('baz')
+ ele.children # => [<bar/>, "baz"]
+ target = ele[1] # => "baz"
+ ele.delete(target) # => "baz"
+ ele.children # => [<bar/>]
+ target = ele[0] # => <baz/>
+ ele.delete(target) # => <baz/>
+ ele.children # => []
+
+Delete a child at a specific index with inherited method REXML::Parent#delete_at:
+
+ ele = Element.new('foo') # => <foo/>
+ ele.add_element('bar')
+ ele.add_text('baz')
+ ele.children # => [<bar/>, "baz"]
+ ele.delete_at(1)
+ ele.children # => [<bar/>]
+ ele.delete_at(0)
+ ele.children # => []
+
+Delete all children meeting a specified criterion with inherited method
+REXML::Parent#delete_if:
+
+ ele = Element.new('foo') # => <foo/>
+ ele.add_element('bar')
+ ele.add_text('baz')
+ ele.add_element('bat')
+ ele.add_text('bam')
+ ele.children # => [<bar/>, "baz", <bat/>, "bam"]
+ ele.delete_if {|child| child.instance_of?(Text) }
+ ele.children # => [<bar/>, <bat/>]
+
+Delete an element at a specific 1-based index with method REXML::Element#delete_element:
+
+ ele = Element.new('foo') # => <foo/>
+ ele.add_element('bar')
+ ele.add_text('baz')
+ ele.add_element('bat')
+ ele.add_text('bam')
+ ele.children # => [<bar/>, "baz", <bat/>, "bam"]
+ ele.delete_element(2) # => <bat/>
+ ele.children # => [<bar/>, "baz", "bam"]
+ ele.delete_element(1) # => <bar/>
+ ele.children # => ["baz", "bam"]
+
+Delete a specific element with the same method:
+
+ ele = Element.new('foo') # => <foo/>
+ ele.add_element('bar')
+ ele.add_text('baz')
+ ele.add_element('bat')
+ ele.add_text('bam')
+ ele.children # => [<bar/>, "baz", <bat/>, "bam"]
+ target = ele.elements[2] # => <bat/>
+ ele.delete_element(target) # => <bat/>
+ ele.children # => [<bar/>, "baz", "bam"]
+
+Delete an element matching an xpath using the same method:
+
+ ele = Element.new('foo') # => <foo/>
+ ele.add_element('bar')
+ ele.add_text('baz')
+ ele.add_element('bat')
+ ele.add_text('bam')
+ ele.children # => [<bar/>, "baz", <bat/>, "bam"]
+ ele.delete_element('./bat') # => <bat/>
+ ele.children # => [<bar/>, "baz", "bam"]
+ ele.delete_element('./bar') # => <bar/>
+ ele.children # => ["baz", "bam"]
+
+Delete an attribute by name with method REXML::Element#delete_attribute:
+
+ ele = Element.new('foo') # => <foo/>
+ ele.add_attributes({'bar' => 'baz', 'bam' => 'bat'})
+ ele.attributes # => {"bar"=>bar='baz', "bam"=>bam='bat'}
+ ele.delete_attribute('bam')
+ ele.attributes # => {"bar"=>bar='baz'}
+
+Delete a namespace with method REXML::Element#delete_namespace:
+
+ ele = Element.new('foo') # => <foo/>
+ ele.add_namespace('bar')
+ ele.add_namespace('baz', 'bat')
+ ele.namespaces # => {"xmlns"=>"bar", "baz"=>"bat"}
+ ele.delete_namespace('xmlns')
+ ele.namespaces # => {} # => {"baz"=>"bat"}
+ ele.delete_namespace('baz')
+ ele.namespaces # => {} # => {}
+
+Remove an element from its parent with inherited method REXML::Child#remove:
+
+ ele = Element.new('foo') # => <foo/>
+ parent = Element.new('bar') # => <bar/>
+ parent.add_element(ele) # => <foo/>
+ parent.children.size # => 1
+ ele.remove # => <foo/>
+ parent.children.size # => 0
+
+==== Replacing Nodes
+
+Replace the node at a given 0-based index with inherited method REXML::Parent#[]=:
+
+ ele = Element.new('foo') # => <foo/>
+ ele.add_element('bar')
+ ele.add_text('baz')
+ ele.add_element('bat')
+ ele.add_text('bam')
+ ele.children # => [<bar/>, "baz", <bat/>, "bam"]
+ ele[2] = Text.new('bad') # => "bad"
+ ele.children # => [<bar/>, "baz", "bad", "bam"]
+
+Replace a given node with another node with inherited method REXML::Parent#replace_child:
+
+ ele = Element.new('foo') # => <foo/>
+ ele.add_element('bar')
+ ele.add_text('baz')
+ ele.add_element('bat')
+ ele.add_text('bam')
+ ele.children # => [<bar/>, "baz", <bat/>, "bam"]
+ target = ele[2] # => <bat/>
+ ele.replace_child(target, Text.new('bah'))
+ ele.children # => [<bar/>, "baz", "bah", "bam"]
+
+Replace +self+ with a given node with inherited method REXML::Child#replace_with:
+
+ ele = Element.new('foo') # => <foo/>
+ ele.add_element('bar')
+ ele.add_text('baz')
+ ele.add_element('bat')
+ ele.add_text('bam')
+ ele.children # => [<bar/>, "baz", <bat/>, "bam"]
+ target = ele[2] # => <bat/>
+ target.replace_with(Text.new('bah'))
+ ele.children # => [<bar/>, "baz", "bah", "bam"]
+
+=== Cloning
+
+Create a shallow clone of an element with method REXML::Element#clone.
+The clone contains the name and attributes, but not the parent or children:
+
+ ele = Element.new('foo')
+ ele.add_attributes({'bar' => 0, 'baz' => 1})
+ ele.clone # => <foo bar='0' baz='1'/>
+
+Create a shallow clone of a document with method REXML::Document#clone.
+The XML declaration is copied; the document type and root element are not cloned:
+
+ my_xml = '<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE foo><root/>'
+ my_doc = Document.new(my_xml)
+ clone_doc = my_doc.clone
+
+ my_doc.xml_decl # => <?xml ... ?>
+ clone_doc.xml_decl # => <?xml ... ?>
+
+ my_doc.doctype.to_s # => "<?xml version='1.0' encoding='UTF-8'?>"
+ clone_doc.doctype.to_s # => ""
+
+ my_doc.root # => <root/>
+ clone_doc.root # => nil
+
+Create a deep clone of an element with inherited method REXML::Parent#deep_clone.
+All nodes and attributes are copied:
+
+ doc.to_s.size # => 825
+ clone = doc.deep_clone
+ clone.to_s.size # => 825
+
+== Writing the Document
+
+Write a document to an \IO stream (defaults to <tt>$stdout</tt>)
+with method REXML::Document#write:
+
+ doc.write
+
+Output:
+
+ <?xml version='1.0' encoding='UTF-8'?>
+ <bookstore>
+
+ <book category='cooking'>
+ <title lang='en'>Everyday Italian</title>
+ <author>Giada De Laurentiis</author>
+ <year>2005</year>
+ <price>30.00</price>
+ </book>
+
+ <book category='children'>
+ <title lang='en'>Harry Potter</title>
+ <author>J K. Rowling</author>
+ <year>2005</year>
+ <price>29.99</price>
+ </book>
+
+ <book category='web'>
+ <title lang='en'>XQuery Kick Start</title>
+ <author>James McGovern</author>
+ <author>Per Bothner</author>
+ <author>Kurt Cagle</author>
+ <author>James Linn</author>
+ <author>Vaidyanathan Nagarajan</author>
+ <year>2003</year>
+ <price>49.99</price>
+ </book>
+
+ <book category='web' cover='paperback'>
+ <title lang='en'>Learning XML</title>
+ <author>Erik T. Ray</author>
+ <year>2003</year>
+ <price>39.95</price>
+ </book>
+
+ </bookstore>