Re: Flat-file to XML converter
This WebDNA talk-list message is from 2006
It keeps the original formatting.
numero = 67588
interpreted = N
texte = If anybody ends up following this thread in the archives or if somebody finds this little 'widget' useful, I've made a couple minor corrections to the code which will ensure that the XML doc validates. The changes were that I took the [index] notation out of
so that the tag is not seen in and of itself as a unique ID and I also corrected the dreaded ampersand problem (thanks to Brian Fries for the assist). Oh and Pat, when I get some time, I'll look into making this puppy work on relational databases.-Dan++++++++++++++++++++++++++++++++++++[!]#-- Flat-file (tab-delim) to XML converter ::: -Dan Strong --[/!][!]-- *** Be sure to set your "path_to_db" var *** --[/!] [text show=f]path_to_db=listings.db[/text] [listfields db=[path_to_db]][text show=f]known_field=[fieldname][/text][/listfields][!]--END set vars --[/!][writefile file=[middle startafter=&endbefore=.][path_to_db][/middle].xml&secure=F][!][/!][!][/!][search db=[path_to_db]&ne[known_field]data=show_all&rank=off][!][/!][founditems][listfields db=[path_to_db]][!][/!]<[interpret][fieldname][/interpret]>[grep search=[url]&[/url]&replace=[url]&[/url]][interpret][[fieldname]][/interpret][/grep][interpret][fieldname][/interpret]>[/listfields][!][/!][/founditems][/search][!][/!][/writefile]XML Conversion Complete[!]#-- END Flat-file (tab-delim) to XML... --[/!]++++++++++++++++++++++++++++++++++++On Sun, 11 Jun 2006 18:38:14 -0700 "Dan Strong" wrote:> I don't see why not. I'll post code soon.> -Dan> > On Sun, 11 Jun 2006 17:49:20 -0500> Pat McCormick wrote:>> How about situations where the data is nested - Customers > Invoices > Line items?>> >> If customers, invoices and line items are all stored in different databases and associated, and >>products in yet another, could you generate a big, flat XML file?-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
If anybody ends up following this thread in the archives or if somebody finds this little 'widget' useful, I've made a couple minor corrections to the code which will ensure that the XML doc validates. The changes were that I took the [index] notation out of so that the tag is not seen in and of itself as a unique ID and I also corrected the dreaded ampersand problem (thanks to Brian Fries for the assist). Oh and Pat, when I get some time, I'll look into making this puppy work on relational databases.-Dan++++++++++++++++++++++++++++++++++++[!]#-- Flat-file (tab-delim) to XML converter ::: -Dan Strong --[/!][!]-- *** Be sure to set your "path_to_db" var *** --[/!] [text show=f]path_to_db=listings.db[/text] [listfields db=[path_to_db]][text show=f]known_field=[fieldname][/text][/listfields][!]--END set vars --[/!][writefile file=[middle startafter=&endbefore=.][path_to_db][/middle].xml&secure=F][!][/!][!][/!][search db=[path_to_db]&ne[known_field]data=show_all&rank=off][!][/!][founditems][listfields db=[path_to_db]][!][/!]<[interpret][fieldname][/interpret]>[grep search=[url]&[/url]&replace=[url]&[/url]][interpret][[fieldname]][/interpret][/grep][interpret][fieldname][/interpret]>[/listfields][!][/!][/founditems][/search][!][/!][/writefile]XML Conversion Complete[!]#-- END Flat-file (tab-delim) to XML... --[/!]++++++++++++++++++++++++++++++++++++On Sun, 11 Jun 2006 18:38:14 -0700 "Dan Strong" wrote:> I don't see why not. I'll post code soon.> -Dan> > On Sun, 11 Jun 2006 17:49:20 -0500> Pat McCormick wrote:>> How about situations where the data is nested - Customers > Invoices > Line items?>> >> If customers, invoices and line items are all stored in different databases and associated, and >>products in yet another, could you generate a big, flat XML file?-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
"Dan Strong"
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
WebCatalog not running after upgrade (2000)
[WebDNA] random blank results? how come? (2014)
[WebDNA] Successful, working WebDNA7/CentOS install? (2013)
can WC render sites out? (1997)
question: Eudora 3.1.1 (1997)
HELP WITH DATES (1997)
Version f1 status (1997)
Search returns all, not 20 (1997)
Document Contains no data, or showcart error. (1997)
Upgrading old WebCat Database Files (1997)
Checkboxes (1997)
two unique banners on one page (1997)
anyone interested in doing an open-source WebCat basedforum? (2002)
is sku a REQUIRED field on NT (1997)
RE: PIXO support (1997)
Last desperate attempt (1998)
Emailing html (1998)
Download URL & access on the fly ? (1997)
add to cart within a page? (1997)
Shopping Cart Deletion (2000)