[jdom-interest] When a text contains HTML-tagged info...

Masaki Itagaki mitagaki at uswest.net
Mon Dec 18 11:36:18 PST 2000

I'm trying to handle an Element that contains HMTL-tagged text as follows:

	<txt> <A href="a.txt">This is a <B>sample</B> text!</A> </txt>
	<loc> Line 5 </loc>

If I get a text with getText() for the [txt] element -- like
((Element)obj).getChild("txt").getText() --, it returns only...

This is a sample text!

If I wish to get [<A href="a.txt">This is a <B>sample</B> text!</A>] as a
whole, is there any simple approach to do that? In using getMixedContents,
it's extremely clumsy to obtain also attribute information pieces.

Any suggestion is appreciated.

Masaki Itagaki

More information about the jdom-interest mailing list