Toby
Toby

Reputation: 3

Why does my XML code not validate from Internet Explorer?

I have generated XML code from a java class, when i open it in internet explorer it works great. Then when i try copy the text from internet explorer into a validator to compare with a schema it comes up with an org.xml.sax.SAXParseException error. When i copy the code from chrome into validator it works great. How do i fix this?

My XML code:

    <?xml version="1.0" encoding="UTF-8"?>

    -<BusStops>


    -<BusStopDetails>

    <AtcoCode>0100BRP90336</AtcoCode>

    <CommonName>The Centre</CommonName>

    <LocalityName>Bristol City Centre</LocalityName>

    <ParentLocalityName>Bristol</ParentLocalityName>

    <Latitude>51.4543379612</Latitude>

    <Longitude>-2.5978824115</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>0170SGA56570</AtcoCode>

    <CommonName>UWE Entrance North</CommonName>

    <LocalityName>Abbey Wood</LocalityName>

    <ParentLocalityName/>

    <Latitude>51.50419145</Latitude>

    <Longitude>-2.549547265</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>079073001Z</AtcoCode>

    <CommonName>Bus Station Express Lounge</CommonName>

    <LocalityName>Middlesbrough</LocalityName>

    <ParentLocalityName/>

    <Latitude>54.5760020508</Latitude>

    <Longitude>-1.2391798779</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>0800COC31523</AtcoCode>

    <CommonName>Bus Station</CommonName>

    <LocalityName>Newquay</LocalityName>

    <ParentLocalityName/>

    <Latitude>50.4130339395</Latitude>

    <Longitude>-5.0856695446</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>0800COC56586</AtcoCode>

    <CommonName>Bus Station</CommonName>

    <LocalityName>Camborne</LocalityName>

    <ParentLocalityName/>

    <Latitude>50.2132677521</Latitude>

    <Longitude>-5.2974299693</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>0800COD40027</AtcoCode>

    <CommonName>St Claire's</CommonName>

    <LocalityName>Penzance</LocalityName>

    <ParentLocalityName/>

    <Latitude>50.1178632763</Latitude>

    <Longitude>-5.5429319148</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>0800COD40491</AtcoCode>

    <CommonName>Railway Station</CommonName>

    <LocalityName>St Erth</LocalityName>

    <ParentLocalityName/>

    <Latitude>50.17113042</Latitude>

    <Longitude>-5.4447567103</Longitude>

    </BusStopDetails>

   -<BusStopDetails>

    <AtcoCode>227000010790</AtcoCode>

    <CommonName>Tesco</CommonName>

    <LocalityName>Scunthorpe</LocalityName>

    <ParentLocalityName/>

    <Latitude>53.5900597528</Latitude>

    <Longitude>-0.6954877689</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>2290YHA01586</AtcoCode>

    <CommonName>Hull Interchange</CommonName>

    <LocalityName>Hull</LocalityName>

    <ParentLocalityName/>

    <Latitude>53.7442912914</Latitude>

    <Longitude>-0.3483033625</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>2500918</AtcoCode>

    <CommonName>University Underpass</CommonName>

    <LocalityName>Lancaster University</LocalityName>

    <ParentLocalityName/>

    <Latitude>54.0102461687</Latitude>

    <Longitude>-2.7854986348</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>2500JB17</AtcoCode>

    <CommonName>Bus Station</CommonName>

    <LocalityName>Preston City Centre</LocalityName>

    <ParentLocalityName>Preston</ParentLocalityName>

    <Latitude>53.7615429712</Latitude>

    <Longitude>-2.6961132517</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>260003731</AtcoCode>

    <CommonName>ASDA Petrol Station</CommonName>

    <LocalityName>Fosse Park</LocalityName>

    <ParentLocalityName/>

    <Latitude>52.5989980284</Latitude>

    <Longitude>-1.1777495222</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>260007240</AtcoCode>

    <CommonName>Holywell Way</CommonName>

    <LocalityName>Loughborough</LocalityName>

    <ParentLocalityName/>

    <Latitude>52.7632692942</Latitude>

    <Longitude>-1.2430689523</Longitude>

    </BusStopDetails>

    -<BusStopDetails>

    <AtcoCode>490016736W</AtcoCode>

    <CommonName>Victoria Coach Station Arrivals</CommonName>

    <LocalityName>Victoria</LocalityName>

    <ParentLocalityName>London</ParentLocalityName>

    <Latitude>51.4934345348</Latitude>

    <Longitude>-0.1490086681</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>5210ANZ12808</AtcoCode>

    <CommonName>Ferry Terminal</CommonName>

    <LocalityName>Pembroke Dock</LocalityName>

    <ParentLocalityName/>

    <Latitude>51.6961675232</Latitude>

    <Longitude>-4.9522760255</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>5220AWK65859</AtcoCode>

    <CommonName>Bus Station </CommonName>

    <LocalityName>Carmarthen</LocalityName>

    <ParentLocalityName/>

    <Latitude>51.8554494637</Latitude>

    <Longitude>-4.3084744349</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>5230AWC53153</AtcoCode>

    <CommonName>Pioneer</CommonName>

    <LocalityName>Lampeter</LocalityName>

    <ParentLocalityName/>

    <Latitude>52.1092562139</Latitude>

    <Longitude>-4.074132457</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>5230AWD71087</AtcoCode>

    <CommonName>University Campus Penglais</CommonName>

    <LocalityName>Penglais</LocalityName>

    <ParentLocalityName/>

    <Latitude>52.4177900287</Latitude>

    <Longitude>-4.065937127</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>5230WDB25330</AtcoCode>

    <CommonName>Bus Station</CommonName>

    <LocalityName>Aberystwyth</LocalityName>

    <ParentLocalityName/>

    <Latitude>52.4144426154</Latitude>

    <Longitude>-4.0809416231</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>5230WDB48199</AtcoCode>

    <CommonName>Pioneer</CommonName>

    <LocalityName>Lampeter</LocalityName>

    <ParentLocalityName/>

    <Latitude>52.1093665968</Latitude>

    <Longitude>-4.0745026926</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>5310WDB47981</AtcoCode>

    <CommonName>Queensway</CommonName>

    <LocalityName>Newport</LocalityName>

    <ParentLocalityName/>

    <Latitude>51.5889028696</Latitude>

    <Longitude>-2.9992653102</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>5710WDB48382</AtcoCode>

    <CommonName>Kingsway</CommonName>

    <LocalityName>Cardiff</LocalityName>

    <ParentLocalityName/>

    <Latitude>51.4840881799</Latitude>

    <Longitude>-3.1788570039</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>5810WDB48071</AtcoCode>

    <CommonName>Bus Station Stand C</CommonName>

    <LocalityName>Swansea</LocalityName>

    <ParentLocalityName/>

    <Latitude>51.617243437</Latitude>

    <Longitude>-3.9462082354</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>60903826</AtcoCode>

    <CommonName>Buchanan Bus Station</CommonName>

    <LocalityName>Glasgow</LocalityName>

    <ParentLocalityName/>

    <Latitude>55.8651960292</Latitude>

    <Longitude>-4.2503286787</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>61601719</AtcoCode>

    <CommonName>Town Centre stances</CommonName>

    <LocalityName>Cumbernauld</LocalityName>

    <ParentLocalityName/>

    <Latitude>55.9467703584</Latitude>

    <Longitude>-3.9907153307</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>6200600739</AtcoCode>

    <CommonName>Bus Station</CommonName>

    <LocalityName>Edinburgh</LocalityName>

    <ParentLocalityName/>

    <Latitude>55.955315382</Latitude>

    <Longitude>-3.192059531</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>639070021</AtcoCode>

    <CommonName>Union Square Bus Station</CommonName>

    <LocalityName>Aberdeen</LocalityName>

    <ParentLocalityName/>

    <Latitude>57.1445763077</Latitude>

    <Longitude>-2.0963111958</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>6400L00040</AtcoCode>

    <CommonName>Bus Station</CommonName>

    <LocalityName>Dundee City Centre</LocalityName>

    <ParentLocalityName>Dundee</ParentLocalityName>

    <Latitude>56.4630579441</Latitude>

    <Longitude>-2.9659684135</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>64802054</AtcoCode>

    <CommonName>Park and Ride</CommonName>

    <LocalityName>Broxden</LocalityName>

    <ParentLocalityName>Perth</ParentLocalityName>

    <Latitude>56.386756734</Latitude>

    <Longitude>-3.4800221149</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>6500D1064</AtcoCode>

    <CommonName>Park and Ride</CommonName>

    <LocalityName>Ferrytoll</LocalityName>

    <ParentLocalityName/>

    <Latitude>56.0225813799</Latitude>

    <Longitude>-3.4062755617</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>6500D1605</AtcoCode>

    <CommonName>Bus Station</CommonName>

    <LocalityName>Dunfermline</LocalityName>

    <ParentLocalityName/>

    <Latitude>56.0722848463</Latitude>

    <Longitude>-3.4617448581</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>6500D1701</AtcoCode>

    <CommonName>Park and Ride</CommonName>

    <LocalityName>Halbeath</LocalityName>

    <ParentLocalityName>Dunfermline</ParentLocalityName>

    <Latitude>56.0840262551</Latitude>

    <Longitude>-3.3912536513</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>66901001017</AtcoCode>

    <CommonName>Asda</CommonName>

    <LocalityName>Falkirk</LocalityName>

    <ParentLocalityName/>

    <Latitude>56.0005777292</Latitude>

    <Longitude>-3.7870320137</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>66901001019</AtcoCode>

    <CommonName>St Andrew`s Church</CommonName>

    <LocalityName>Falkirk</LocalityName>

    <ParentLocalityName/>

    <Latitude>56.0004700396</Latitude>

    <Longitude>-3.7864015998</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>9100STPMEG</AtcoCode>

    <CommonName>London St Pancras Megabusplus</CommonName>

    <LocalityName>St Pancras</LocalityName>

    <ParentLocalityName>London</ParentLocalityName>

    <Latitude>51.5306153552</Latitude>

    <Longitude>-0.1255278085</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>66004000033</AtcoCode>

    <CommonName>Allan Park South Church</CommonName>

    <LocalityName>Stirling</LocalityName>

    <ParentLocalityName/>

    <Latitude>56.1170355497</Latitude>

    <Longitude>-3.9382449181</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>66004890065</AtcoCode>

    <CommonName>Argyll Avenue</CommonName>

    <LocalityName>Stirling</LocalityName>

    <ParentLocalityName/>

    <Latitude>56.1244909497</Latitude>

    <Longitude>-3.9315889902</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>66004481015</AtcoCode>

    <CommonName>Linden Avenue</CommonName>

    <LocalityName>Stirling</LocalityName>

    <ParentLocalityName/>

    <Latitude>56.1110354722</Latitude>

    <Longitude>-3.9305930859</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>66004000039</AtcoCode>

    <CommonName>Murray Place</CommonName>

    <LocalityName>Stirling</LocalityName>

    <ParentLocalityName/>

    <Latitude>56.1194615081</Latitude>

    <Longitude>-3.9371282257</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>66004000043</AtcoCode>

    <CommonName>Railway Station</CommonName>

    <LocalityName>Stirling</LocalityName>

    <ParentLocalityName/>

    <Latitude>56.1204940089</Latitude>

    <Longitude>-3.9366170649</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>6200243380</AtcoCode>

    <CommonName>North St David Street</CommonName>

    <LocalityName>Edinburgh</LocalityName>

    <ParentLocalityName/>

    <Latitude>55.9550130307</Latitude>

    <Longitude>-3.1945167932</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>6200206485</AtcoCode>

    <CommonName>Princes Mall</CommonName>

    <LocalityName>Edinburgh</LocalityName>

    <ParentLocalityName/>

    <Latitude>55.9531738427</Latitude>

    <Longitude>-3.1905042482</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>6200206165</AtcoCode>

    <CommonName>Princes Street</CommonName>

    <LocalityName>Edinburgh</LocalityName>

    <ParentLocalityName/>

    <Latitude>55.9506985183</Latitude>

    <Longitude>-3.2048095889</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>60903901</AtcoCode>

    <CommonName>Scotland Street</CommonName>

    <LocalityName>Glasgow</LocalityName>

    <ParentLocalityName/>

    <Latitude>55.849666387</Latitude>

    <Longitude>-4.2659346227</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>60903904</AtcoCode>

    <CommonName>Shields Road</CommonName>

    <LocalityName>Glasgow</LocalityName>

    <ParentLocalityName/>

    <Latitude>55.8499104556</Latitude>

    <Longitude>-4.2746241674</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>609093</AtcoCode>

    <CommonName>Shuttle Street</CommonName>

    <LocalityName>Glasgow</LocalityName>

    <ParentLocalityName/>

    <Latitude>55.8605228656</Latitude>

    <Longitude>-4.2409492822</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>60903844</AtcoCode>

    <CommonName>St Andrews Square</CommonName>

    <LocalityName>Glasgow</LocalityName>

    <ParentLocalityName/>

    <Latitude>55.8549094588</Latitude>

    <Longitude>-4.2436939603</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>60903539</AtcoCode>

    <CommonName>St Enoch shopping centre</CommonName>

    <LocalityName>Glasgow</LocalityName>

    <ParentLocalityName/>

    <Latitude>55.8560567892</Latitude>

    <Longitude>-4.2517336817</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>639080008</AtcoCode>

    <CommonName>Aberdeen Railway Station</CommonName>

    <LocalityName>Aberdeen</LocalityName>

    <ParentLocalityName/>

    <Latitude>57.1437934462</Latitude>

    <Longitude>-2.0980112638</Longitude>

    </BusStopDetails>


    -<BusStopDetails>

    <AtcoCode>9300ABA</AtcoCode>

    <CommonName>Aberdeen Ferry Terminal</CommonName>

    <LocalityName>Aberdeen</LocalityName>

    <ParentLocalityName/>

    <Latitude>57.1447953603</Latitude>

    <Longitude>-2.0917010936</Longitude>

    </BusStopDetails>

    </BusStops>

Upvotes: 0

Views: 45

Answers (1)

Tim Biegeleisen
Tim Biegeleisen

Reputation: 520878

My advice to you would be to not copy the XML from the actual Internet Explorer view. If you look closely, you'll notice that IE has modified some of the tags by adding a dash to them, e.g.

-<BusStops>
-<BusStopDetails>

A better bet would be to either save the XML in IE and open that saved file in Chrome, or just open the export from Java directly in Chrome.

Upvotes: 2

Related Questions