Hi Dan,
I tried your solution. Unfortunately it didn't work.
String base = atts.getValue("",    "xml:base");
Dont know why it can get the href value, but not the base.
thanks,
Anil

On Apr 8, 5:55 pm, "Dan U." <[EMAIL PROTECTED]> wrote:
> Well, I can't give you an explanation at this time, but if you do
> String base = atts.getValue("", "xml:base");, it should work.
>
> On Apr 8, 2:33 pm, Anil <[EMAIL PROTECTED]> wrote:
>
> > 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