// "Cp856",
// "ISCII91",
};
System.setProperty("nu.xom.Verifier.checkURI", "false");
XMLOutputFactory outFactory = createXMLOutputFactory(args[0]);
StreamingSerializerFactory factory = new StreamingSerializerFactory();
int bugs = 0;
int k = 0;
for (int i=1; i < args.length; i++) {
File[] files = IOTestUtil.listXMLFiles(args[i]);
for (int j=0; j < files.length; j++, k++) {
File file = files[j];
if (bogus(file) || ignore(file) || file.isDirectory()) {
System.out.println("\n" + k + ": IGNORING " + file + " ...");
continue;
}
System.out.println("\n" + k + ": now processing " + file + " ...");
Document expected = getBuilder().build(file);
// System.out.println(expected.toXML());
System.out.print("*");
for (int enc = 0; enc < encodings.length; enc++) {
try {
ByteArrayOutputStream out = new ByteArrayOutputStream();
StreamingSerializer ser;
// ser = factory.createXMLSerializer(out, encoding);
// ((nu.xom.Serializer) ser).setIndent(4);
ser = factory.createStaxSerializer(outFactory.createXMLStreamWriter(out, encodings[enc]));
ser.write(expected);
// String s = new String(out.toByteArray());
// s = s.substring(0, Math.min(2000, s.length()));
// System.out.println("\n" + s + "\n");