Re: Using XPP3 in an Applet
Aleksander Slominski <[email protected]>
| Newsgroups | gmane.text.xml.xmlpull.devel |
|---|---|
| Message-ID | <[email protected]> |
sisyphus_shadow wrote: >I am trying to use XPP3 in a applet to parse data from a URL on the >Web server. I ran the example given in MyXmlPullApp.class and it >worked fine. Unfortunatly, with the applet I get the following >error: > >java.security.AccessControlException: access denied >(java.util.PropertyPermission org.xmlpull.v1.XmlPullParserFactory > >when calling the System.getPOropery while creating the factory. > >XmlPullParserFactory factory = XmlPullParserFactory.newInstance( > System.getProperty(XmlPullParserFactory.PROPERTY_NAME), null); > >I am relatively new to Java and could use some help. > >What do I need to do to parse XML in an Applet? > >Thanks for your help. > > hi, in such environment where only one parser implementation is available i would create parser instance directly (for example by calling new* org.xmlpull.mxp1.MXParser())* would not use org.xmlpull.v1.XmlPullParserFactory it is true that factory provides allow to hide implementation and to allow switching different implementations without application source code change - but this flexibility is rarely needed in applets anyway - but on the other hand for applets size matters and not using XmlPullParserFactory will keep applet size smaller .. hope it helps, alek ------------------------ Yahoo! Groups Sponsor ---------------------~--> Get 128 Bit SSL Encryption! http://us.click.yahoo.com/LIgTpC/vN2EAA/xGHJAA/2U_rlB/TM ---------------------------------------------------------------------~-> To unsubscribe from this group, send an email to: [email protected] Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/