Hi,

I need to determine whether a document lacks content. The doc may have
body and paragraph tags but be empty.  I've tried and failed, so I
have 2 questions.

1) Is there an obvious way to do this that I'm overlooking?

2) Is my strategy OK?  Here is what I've tried.
   - Get an HTMLDocument.Iterator for tag type HTML.Tag.CONTENT, from
     the Document returned by JEditorPane's getDocument method 
     (inherited from JTextComponent),
   - Iterate through the tags using their getString methods to find
     text.

Here is what happens.

The first call to the iterator's isValid returns false. End of show.

If I try other Tag types, for example TD (of which there are loads in a 
test doc) or BODY (which will be there even in empty documents) the
iterator itself is null.

What am I doing wrong?

I'm using blackdown j2sdk1.3.0 on a Red Hat 7.1 system under kernel 2.4.7.

Thanks,

Dick


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to