ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> xml-sig
xml-sig
Re: [XML-SIG] Looking for a generic efficient script for reading xml containing CDATA, extracting data for ready to be stored in a .dbf file
by Stefan Behnel other posts by this author
Dec 22 2008 11:26PM messages near this date
[XML-SIG] Looking for a generic efficient script for reading xml containing CDATA, extracting data for ready to be stored in a .dbf file | [XML-SIG] can't install pyxml on windows vista
& XSLT Hi,

David Shi wrote:
>  Looking for a generic efficient script for reading xml containing CDATA,
>  extracting data for ready to be stored in a .dbf file

My guess is that your best bet is to do the conversion yourself in order to
get the mapping right.

Asking Google for "python .dbf file" gives a couple of hits, including this
one:

http://dbfpy.sourceforge.net/

Parsing the XML step-by-step to do the mapping on the fly should be easy
using iterparse() in ElementTree or lxml. Not sure about ElementTree, but
at least lxml handles CDATA sections nicely and gives you the plain text.

Stefan
_______________________________________________
XML-SIG maillist  -  XML-SIG@[...].org
http://mail.python.org/mailman/listinfo/xml-sig
Thread:
David Shi
Stefan Behnel

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved