[web2py] Re: How to insert data in data base by xml file

2015-07-07 Thread Carla Raquel
This is how I dealt with my xml files: doc = xml.dom.minidom.parse("...my_xml.xml")// Here you parse the xml file for node in doc.getElementsByTagName("recipe")://Here you read in a cycle the tags which contain numerous attributes each t=node.getAttribute("name")//Each attribute is st

Re: [web2py] Re: How to insert data in data base by xml file

2015-07-06 Thread Dave S
On Monday, July 6, 2015 at 8:22:11 AM UTC-7, Sai Harsh Tondomker wrote: > > Thanks for reply. > Could you please give me one example and where I can get enough matter to > write the code. > > Here's a little fragment of stuff I'm doing (not with Web2Py) using Beautiful Soup: f = codecs.ope

Re: [web2py] Re: How to insert data in data base by xml file

2015-07-06 Thread Anthony
On Monday, July 6, 2015 at 11:22:11 AM UTC-4, Sai Harsh Tondomker wrote: > > Thanks for reply. > Could you please give me one example and where I can get enough matter to > write the code. > Note, this is not web2py specific. As suggested, check the various XML libraries and seek help via SO or

Re: [web2py] Re: How to insert data in data base by xml file

2015-07-06 Thread Sai Harsh Tondomker
Thanks for reply. Could you please give me one example and where I can get enough matter to write the code. On Mon, Jul 6, 2015 at 1:11 PM, Johann Spies wrote: > On 3 July 2015 at 23:43, Anthony wrote: > >> All of the effort will be in parsing the XML, so you should check the >> documentation

Re: [web2py] Re: How to insert data in data base by xml file

2015-07-06 Thread Johann Spies
On 3 July 2015 at 23:43, Anthony wrote: > All of the effort will be in parsing the XML, so you should check the > documentation of the various XML libraries and ask questions in their > forums (or on Stack Overflow). The details will depend on the structure of > your XML. Ultimately, you want to

[web2py] Re: How to insert data in data base by xml file

2015-07-03 Thread Anthony
All of the effort will be in parsing the XML, so you should check the documentation of the various XML libraries and ask questions in their forums (or on Stack Overflow). The details will depend on the structure of your XML. Ultimately, you want to loop over the records in the XML, and for each

[web2py] Re: How to insert data in data base by xml file

2015-07-03 Thread Sai Harsh Tondomker
Thanks for replying. Could you please give me one example. Waiting for your response On Wednesday, July 1, 2015 at 7:56:17 PM UTC+5:30, Anthony wrote: > > You can parse the XML with something like ElementTree, lxml, or Beautiful > Soup. Then you would have to write some code to extract the d

[web2py] Re: How to insert data in data base by xml file

2015-07-01 Thread Anthony
You can parse the XML with something like ElementTree, lxml, or Beautiful Soup. Then you would have to write some code to extract the data for individual records (which will depend on the structure of the XML) and use the DAL to insert each record. Anthony On Wednesday, July 1, 2015 at 10:01:1