module MultiXml::Parsers::Nokogiri

def each_attr(node, &)

def each_attr(node, &)
  node.attribute_nodes.each(&)
end

def each_child(node, &)

def each_child(node, &)
  node.children.each(&)
end

def node_name(node)

def node_name(node)
  node.node_name
end

def parse(xml)

def parse(xml)
  doc = ::Nokogiri::XML(xml)
  raise(doc.errors.first) unless doc.errors.empty?
  node_to_hash(doc.root)
end

def parse_error

def parse_error
  ::Nokogiri::XML::SyntaxError
end