// TODO show resulting document
public static final int testElementParsing (
            final PrintStream out, final BufferedReader in, final String ... args)
    {
        final String    ans=getval(out, in, "use owner document y/[n]/q");
        if (isQuit(ans))
            return 0;
        Document    owner=null;
        if ((ans != null) && (ans.length() > 0) && ('y' == Character.toLowerCase(ans.charAt(0))))
        {
            try
            {
                owner = DOMUtils.createDefaultDocument();
            }
            catch(ParserConfigurationException e)
            {
                System.err.println(e.getClass().getName() + ": " + e.getMessage());
            }
        }
        final int    nErr=testElementParsing(out, in, owner, args);
        if (owner != null)
        {
            // TODO show resulting document
        }
        return nErr;
    }
if (owner != null)
{
// TODO show resulting document
}
return nErr;
owner = DOMUtils.createDefaultDocument();
}
catch(ParserConfigurationException e)
{
System.err.println(e.getClass().getName() + ": " + e.getMessage());
}
}
final int nErr=testElementParsing(out, in, owner, args);
if (owner != null)
{
// TODO show resulting document
}
return nErr;
}
final PrintStream out, final BufferedReader in, final String ... args)
{
final String ans=getval(out, in, "use owner document y/[n]/q");
if (isQuit(ans))
return 0;
Document owner=null;
if ((ans != null) && (ans.length() > 0) && ('y' == Character.toLowerCase(ans.charAt(0))))
{
try
{
owner = DOMUtils.createDefaultDocument();
}
catch(ParserConfigurationException e)
{
System.err.println(e.getClass().getName() + ": " + e.getMessage());
}
}
final int nErr=testElementParsing(out, in, owner, args);
if (owner != null)
{
// TODO show resulting document
}
return nErr;
}