As far as I know, web2py does not work directly with XML. It can output to 
xml automatically, and serializes, but as far as working with xml as data, 
I don't think it has anything like that.
You should be able to use the python standard libraries for that. I prefer 
xml.dom.minidom, but I've heard good things about xml.etree.ElementTree. If 
you are familiar with jQuery, I believe you can use it's selectors to parse 
XML also. I think the preferred way of working with xml in web2py is to 
import the data into a database and use DAL for your queries. 

Hmm, for some reason I can't get to web2py.com right now, so I can't check 
the documentation on that.

On Friday, July 20, 2012 7:11:27 AM UTC-7, Don_X wrote:
>
> Hello everyone ...
>
> I am trying to intergrate a jquery mappicker within my web2py app !
> One of the js file calls upon an xml file containing the text information 
> related to the location clicked on the map shown on screen !
>
> the js function goes like this :
>   ...  ... ...
>
> $.ajax({
>         type: 'GET',
>         url: 'xml/canadaMapSettings.xml',
>         dataType: $.br$.ajax({
>         type: 'GET',
>         url: 'xml/canadaMapSettings.xml',
>         dataType: $.browser.msie ? 'text' : 'xml',
>         success: function (data) {owser.msie ? 'text' : 'xml',
>         success: function (data) {
>            .
>            ...
>
> as you see, the snippets of code above  in the js file function calls upon 
> the canadaMapSetting.xml 
>  
> First) please take note that this js file is in the js folder within the 
> static folder of web2py
>
> Second) the "canadaMapSetting.xml" file has text information that I would 
> want to be serialized by web2py for the presentation of these texts on the 
> view page that uses it ( such as the Translate function "T" )
>
> So my  2 questions are these :
>
> Primo:  Can I have an xml file be serialized by web2py when it is called 
> by a js file and where would I include this xml file .. ( I am thinking 
> that the xml file has to be placed in the view folder !! ) ?
>             which brings me to my second question ... : how would I call 
> upon that  xml file in the js file ... should i modified the way it is 
> called in the ajax function above ??? ...  should I just write 
>
> url: 'canadaMapSettings.xml' or another way ???
>
> Any clues or directives regarding this issue would be greatly appreciated !
>
> thank you
>
> Don
>
>
>
>

-- 



Reply via email to