work around unparsable XML when querying departures

This commit is contained in:
Andreas Schildbach 2012-06-20 11:28:19 +02:00
parent 6d4c0046d8
commit b61ebf3a7d

View file

@ -536,8 +536,10 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
try try
{ {
// work around unparsable XML
reader = new StringReplaceReader(new InputStreamReader(ParserUtils.scrapeInputStream(uri), ISO_8859_1), "Ringbahn ->", "Ringbahn ->"); reader = new StringReplaceReader(new InputStreamReader(ParserUtils.scrapeInputStream(uri), ISO_8859_1), "Ringbahn ->", "Ringbahn ->");
reader.replace("Ringbahn <-", "Ringbahn &lt;-"); reader.replace("Ringbahn <-", "Ringbahn &lt;-");
reader.replace(" & ", " &amp; ");
// System.out.println(uri); // System.out.println(uri);
// ParserUtils.printFromReader(reader); // ParserUtils.printFromReader(reader);