This works fine in j2se, but am stumped why it fails in android.
Cannot get attribute "base" from XMLReader (SAX). It is always null.
Any help appreciated.
thanks,
Anil


schema:
-----------
<xs:complexType name="RelativeURI">
        <xs:simpleContent>
                <xs:extension base="xs:anyURI">
                        <xs:attribute ref="xml:base"/>
                        <xs:attribute name="href" type="xs:string"/>
                </xs:extension>
        </xs:simpleContent>
</xs:complexType>


<xs:element name="imgLocation" type="RelativeURI" minOccurs="0"
maxOccurs="1"/>


data:
-------
<imgLocation xml:base="file:/data/data/com.jo.blockpad/files/jo-
files/" href="hasaudio.jpg"/>


allocating parser:
-------------------------
System.setProperty("org.xml.sax.driver","org.xmlpull.v1.sax2.Driver");
parser = XMLReaderFactory.createXMLReader();

*OR*

       SAXParserFactory spf = SAXParserFactory.newInstance();
       SAXParser sp;
        sp = spf.newSAXParser();
       // Get the XMLReader of the SAXParser we created.
        parser = sp.getXMLReader();

trying to retrieve the attribute, *base is always null*

String base = atts.getValue("http://www.w3.org/XML/1998/
namespace",                                             "xml:base");

*OR*

String base = atts.getValue("", "base");


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to