alidiepuit / osmtracker-android

Automatically exported from code.google.com/p/osmtracker-android
GNU General Public License v3.0
0 stars 0 forks source link

Error while parsing XML layout file. #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create the new layout file : 
<?xml version="1.0" encoding="utf-8"?>

<layouts>

    <layout name="root">

        <row>

            <button type="tag" label="Max 30" />

            <button type="tag" label="Max 50" />

            <button type="tag" label="Max 60" />

        </row>

        <row>

            <button type="tag" label="Max 70" />

            <button type="tag" label="Max 80" />

            <button type="tag" label="Max 100" />

        </row>

    </layout>

</layouts>

2. Select it on the settings.

What is the expected output? What do you see instead?
I want to have my new layout but I have this Error message : 
Error while parsing XML layout file. Please revert to default layout.

What version of the product are you using (See "About" screen)?
0.4.2

Make/model of your device, and Android version?
HTC Dream (G1)

Please provide any additional information below.

Original issue reported on code.google.com by stephane...@gmail.com on 14 May 2010 at 1:15

GoogleCodeExporter commented 9 years ago
I can reproduce this one. This occurs when the XML file contains a
[http://en.wikipedia.org/wiki/Byte_order_mark BOM]. If you remove the BOM from 
your
XML file it should work. The way to do that depends of what editor you're 
using, for
example with Notepad++ it's in "Encoding" --> "UTF-8 without BOM".

I'll have a look to see if I can prevent the error, or at least give a more 
explicit
error message...

Original comment by nguillau...@gmail.com on 5 Jun 2010 at 3:20

GoogleCodeExporter commented 9 years ago
Unfortunately it's not simple to prevent this in code. However if you remove 
the xml
declaration header from your file {{{<?xml version="1.0" encoding="utf-8"?>}}} 
it
will work with or without BOM.

So just don't put any XML header and it should be ok :-). I'll update the doc 
for
custom layout with this info.

Original comment by nguillau...@gmail.com on 5 Jun 2010 at 6:24