Re: HTML parsing
Stefan Haustein <[email protected]> Wed, 09 Jun 2004 22:32:15 +0200
| Newsgroups | gmane.comp.java.enhydra.kxml |
|---|---|
| Organization | University of Dortmund |
| Message-ID | <[email protected]> |
Swapna Gupta wrote:
> How can one use kxml in "Relaxed" mode to parse HTML?
>
> But in the downloaded (v.2.1.9) version of kxml2 there is no class
> called XmlParser or method called setRelaxed.
>
> Is parsing in Relaxed mode not yet supported?
Hi Swapna,
the code fragment below contains the desired setup for 2.1.9.
HTH
Best,
Stefan
XmlPullParser parser = new KXmlParser();
parser.setFeature(
XmlPullParser.FEATURE_PROCESS_NAMESPACES,
true);
parser.setFeature(
"http://xmlpull.org/v1/doc/features.html#relaxed",
true);
parser.setInput(is, null);
>
>
>
> Thanks,
>
> Swapna
>
>