public class WikipediaXMLParser extends Object
| Constructor and Description |
|---|
WikipediaXMLParser() |
| Modifier and Type | Method and Description |
|---|---|
String |
extractRedirect(String xmlString)
Extracts the value of the
to attribute of the first redirect
that it can find inside the given XML string. |
public String extractRedirect(String xmlString)
Extracts the value of the to attribute of the first redirect
that it can find inside the given XML string.
It is assumed that the given String looks like this:
...
<redirects>
...
<r from="title" to="redirected title"/>
...
</redirects>
...
xmlString - XML string from which the redirect should be parsed.Copyright © 2014–2017. All rights reserved.