#! /usr/bin/perl

use strict;
use warnings FATAL => 'all';
use utf8;
use XML::LibXML;

my $parser = new XML::LibXML;
$parser->pedantic_parser(1);
$parser->no_network(1);
$parser->keep_blanks(0);
$parser->line_numbers(1);

my $doc = $parser->parse_file('vlans.xml');

my $schema = new XML::LibXML::Schema(location => 'vlans.xsd');

$schema->validate($doc);

print $doc->toString(1) =~ s{^(?:  )+<}{"\t"x(length($&)/2)."<"}ermga
	or die;
