Sha256: 164e74bb16b7720a459872ddec3b31dae6d4f4a793a0ac13279a04d6428db488
Contents?: true
Size: 780 Bytes
Versions: 25
Compression:
Stored size: 780 Bytes
Contents
# frozen_string_literal: true require "plurimath/xml_engine" require "plurimath/xml_engine/ox/element" require "ox" Ox.default_options = { encoding: "UTF-8" } module Plurimath module XmlEngine class Ox class << self def new_element(name) Element.new(name) end def dump(data, **options) ::Ox.dump(data.xml_nodes, **options) end def load(data) Element.new( ::Ox.load(data, strip_namespace: true), ) end def is_xml_comment?(node) return node.is_xml_comment? if node.is_a?(Element) false end def replace_nodes(root, nodes) root.replace_nodes(Array(nodes)) root end end end end end
Version data entries
25 entries across 25 versions & 1 rubygems