class Crul::Formatters::XML::PrettyPrinter

Defined in:

formatters/xml.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(input : IO | String, output : IO) #

[View source]

Instance Method Detail

def print #

[View source]
def valid_xml? #

This is a stupid way of doing this, but at some point between Crystal 0.8.0 and 0.10.0 XML::Reader stopped raising exceptions or reporting errors in the way XML.parse does. Real solution would be either 1) fix that in Crystal, or 2) make the Printer use XML.parse (not inefficient because it's not doing streaming anyway). But for the time being, this is the smallest change that fixes it


[View source]