Rectangle 27 98

I'm going to add a separate answer just because I don't see it here. It's not 100% what Pentium10 asked for, but I ended up here by searching for Error parsing XML: unbound prefix

Turns out I was using custom parameters for AdMob ads like ads:adSize, but I hadn't added


frequent issues arising in android view, Error parsing XML: unbound pr...

xml android eclipse android-linearlayout
Rectangle 27 1

The reason the code is not working is because of the namespace. If the namespace is always the same, you can code it as a prefix to the tag you're trying to find:

import xml.etree.ElementTree as ET

xml = """
<rpc-reply xmlns:junos="">
    <route-information xmlns="">
        <!-- keepalive -->
            <rt junos:style="brief">
                    <age junos:seconds="428929">4d 23:08:49</age>

root = ET.fromstring(xml)
rt_nodes = root.iter(tag='{}rt-destination'.format(XML_NAMESPACE))
print  #

If you need something more flexible, you can check out the answers here.

python - ElementTree: Parsing XML great-grandchildren - Stack Overflow

python xml automation elementtree
Rectangle 27 1

I think the namespace in the XML is causing a problem for parsing. Try to specify the namespace in and mention the prefix as "a" in there. You can check more information here.

You could check a similar question here

The response XML returned from my web service call had some issue which caused the exception when unmarshaling it. When I removed some unused sections from the XSD file, this worked.

Great ! Still, you could mark the sections which are optional in the XSD as optional using minOccurs attribute (that is, if these sections can appear again, in some other responses its better to mark them as optional rather than removing(I know, that's not what you asked for)).

Since I auto generate the XSD, optional fields are automatically marked thus they are annotated in the generated java files as well. Having the unused fields annotated as that didn't make any difference in resolving the issue. I use eclipselink within my project. I doubt it can be one reason for this.

java - javax.xml.bind.UnmarshalException iccurs when unmarshalling an ...

java xml jaxb
Rectangle 27 3

I'll throw in a little more for the newbies and for folks, like myself, that don't understand XML.

The answers above a pretty good, but the general answer is that you need a namespace for any namespace used in the config.xml file.

Translation: Any XML tag name that has is a tag with a namespace where blah is the namespace and fubar is the XML tag. The namespace lets you use many different tools to interpret the XML with their own tag names. For example, Intel XDK uses the namespace intelxdk and android uses android. Thus you need the following namespaces or the build throws up blood (i.e. Error parsing XML: unbound prefix) which is translated to: You used a namespace, but did not define it.


frequent issues arising in android view, Error parsing XML: unbound pr...

xml android eclipse android-linearlayout