module Nokogiri::XML::PP::Node
def inspect
def inspect attributes = inspect_attributes.reject do |x| attribute = send(x) !attribute || (attribute.respond_to?(:empty?) && attribute.empty?) rescue NoMethodError true end attributes = if inspect_attributes.length == 1 send(attributes.first).inspect else attributes.map do |attribute| "#{attribute}=#{send(attribute).inspect}" end.join(" ") end "#<#{self.class.name}:#{format("0x%x", object_id)} #{attributes}>" end