class Lutaml::Xml::DataModel::XmlProcessingInstruction
Represents an XML processing instruction.
def self.parse_pseudo_attributes(content)
-
(Hash)- Parsed key-value pairs
Parameters:
-
content(String) -- PI content with key="value" pairs
def self.parse_pseudo_attributes(content) return {} unless content.is_a?(String) && !content.strip.empty? chunks = content.split(/=['"]([^'"]*)['"]/) result = {} chunks.each_slice(2) do |key, value| next unless key && value result[key.strip] = value end result end
def initialize(target, content)
def initialize(target, content) @target = target @content = content end
def to_s
def to_s "<?#{target} #{content}?>" end