R
RC
In my XML file there are many <!-- comments -->
I am using org.xml.sax.ext.DefaultHandler2
Accord to the API the comment method
Report an XML comment anywhere in the document.
But I don't get any print out from below
comment method!
Can anyone tell me what I do wrong?
Thank you very much in advance!
@Override
public void comment(char[] ch, int start, int length)
throws SAXException
{
if (ch != null && ch.length > 0)
{
String tmpstr = new String(ch, start, length);
if (tmpstr != null && ! tmpstr.trim().equals(""))
{
System.out.println("comments ---------> " +
tmpstr.trim());
} // end inner if
} // end outer if
} // end method
I am using org.xml.sax.ext.DefaultHandler2
Accord to the API the comment method
Report an XML comment anywhere in the document.
But I don't get any print out from below
comment method!
Can anyone tell me what I do wrong?
Thank you very much in advance!
@Override
public void comment(char[] ch, int start, int length)
throws SAXException
{
if (ch != null && ch.length > 0)
{
String tmpstr = new String(ch, start, length);
if (tmpstr != null && ! tmpstr.trim().equals(""))
{
System.out.println("comments ---------> " +
tmpstr.trim());
} // end inner if
} // end outer if
} // end method