When I do a syntax check on the following XML code I get the error:
error on line 2 at column 14: Failed to parse QName 'xmlns:'
Can anyone tell me what I'm doing wrong? Thanks!
<?xml version = "1.0" encoding = "utf-8"?>
<Bitmap xmlns: android = "http://schemas.android.com/apk/res/android"
android: src = "@ assets/dragon.png" />
Infact you could have tried this yourself
XML does not allow white-space characters in element- or attribute-names.
Remove the space between xmlns:
and android
; Also android:
and src
<?xml version = "1.0" encoding = "utf-8"?>
<Bitmap xmlns:android = "http://schemas.android.com/apk/res/android"
android:src = "@ assets/dragon.png" />
I tried using online validator, and dont see errors now http://www.w3schools.com/xml/xml_validator.asp
Update: As @Ian Roberts suggested, Please use this validator. I tried this, it was showing all possible warnings as well - http://validator.w3.org/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With