class Nokogiri::XML::Node

def initialize(name, document)


[Returns] Nokogiri::XML::Node
[Yields] Nokogiri::XML::Node
- +document+ (Nokogiri::XML::Document) The document to which the the returned node will belong.
- +name+ (String)
[Parameters]

attributes but (like this method) avoids parsing markup.
Nokogiri::XML::Document#create_element which accepts additional arguments for contents or
Another alternative, if you are concerned about performance, is

both create an element (or subtree) and place it in the document tree.
Nokogiri::XML::Node methods like #add_child, #add_next_sibling, #replace, etc. which will
If you intend to add a node to a document tree, it's likely that you will prefer one of the

Create a new node with +name+ that belongs to +document+.

new(name, document) { |node| ... } -> Nokogiri::XML::Node
new(name, document) -> Nokogiri::XML::Node
:call-seq:
def initialize(name, document)
  # This is intentionally empty, and sets the method signature for subclasses.
end