Per accedere al file fai così:

data = myfile.getFile()

Così elabori l'xml:

from lxml import etree
import lxml.html
import lxml.etree
...
...
tree = lxml.html.fromstring(data)
allLinks = tree.xpath("//div/ul/li/a")

Se non hai la libreria lxml, la inserisci nel buildout così:

[buildout]

parts =
     ...
     lxml
     ...

eggs+=
     lxml == 2.3beta1

[lxml]
recipe=plone.recipe.lxml
egg = lxml == 2.3beta1

-----
--

Giacomo Spettoli

http://www.spettoli.com 
http://www.spettoli.com/sites/all/themes/spettoli/images/banner.png 

-- 
View this message in context: 
http://plone-regional-forums.221720.n2.nabble.com/Leggere-un-XML-caricato-come-file-tp6064655p6064797.html
Sent from the Plone - Italy mailing list archive at Nabble.com.
_______________________________________________
Plone-IT mailing list
Plone-IT@lists.plone.org
https://lists.plone.org/mailman/listinfo/plone-it
http://plone-regional-forums.221720.n2.nabble.com/Plone-Italy-f221721.html

Reply via email to