Re: [PHP] XML data extraction
Andrew Williams wrote: Best All, How can you best and accurately extract XLM data to DB table. e.g.: EXCHANGE_LIST AMOUNT=3 - EXCHANGE ID_EXCHANGE20/ID_EXCHANGE CODE_EXCHANGEFRA/CODE_EXCHANGE NAME_EXCHANGEFrankfurt/NAME_EXCHANGE /EXCHANGE - EXCHANGE ID_EXCHANGE28/ID_EXCHANGE CODE_EXCHANGELSE/CODE_EXCHANGE NAME_EXCHANGELondon Stock Exchange/NAME_EXCHANGE /EXCHANGE - EXCHANGE ID_EXCHANGE226/ID_EXCHANGE CODE_EXCHANGEGER/CODE_EXCHANGE NAME_EXCHANGEXetra/NAME_EXCHANGE /EXCHANGE /EXCHANGE_LIST www.willandy.co.uk Oh, I thought of another one: Write some XSL to turn you XML into SQL. Write some code to run that SQL. HTH Pete -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XML data extraction
Best All, How can you best and accurately extract XLM data to DB table. e.g.: EXCHANGE_LIST AMOUNT=3 - EXCHANGE ID_EXCHANGE20/ID_EXCHANGE CODE_EXCHANGEFRA/CODE_EXCHANGE NAME_EXCHANGEFrankfurt/NAME_EXCHANGE /EXCHANGE - EXCHANGE ID_EXCHANGE28/ID_EXCHANGE CODE_EXCHANGELSE/CODE_EXCHANGE NAME_EXCHANGELondon Stock Exchange/NAME_EXCHANGE /EXCHANGE - EXCHANGE ID_EXCHANGE226/ID_EXCHANGE CODE_EXCHANGEGER/CODE_EXCHANGE NAME_EXCHANGEXetra/NAME_EXCHANGE /EXCHANGE /EXCHANGE_LIST www.willandy.co.uk
Re: [PHP] XML data extraction
Andrew Williams wrote: Best All, How can you best and accurately extract XLM data to DB table. e.g.: EXCHANGE_LIST AMOUNT=3 - EXCHANGE ID_EXCHANGE20/ID_EXCHANGE CODE_EXCHANGEFRA/CODE_EXCHANGE NAME_EXCHANGEFrankfurt/NAME_EXCHANGE /EXCHANGE - EXCHANGE ID_EXCHANGE28/ID_EXCHANGE CODE_EXCHANGELSE/CODE_EXCHANGE NAME_EXCHANGELondon Stock Exchange/NAME_EXCHANGE /EXCHANGE - EXCHANGE ID_EXCHANGE226/ID_EXCHANGE CODE_EXCHANGEGER/CODE_EXCHANGE NAME_EXCHANGEXetra/NAME_EXCHANGE /EXCHANGE /EXCHANGE_LIST www.willandy.co.uk Write some code to read the XML file. (you could at simpleXML, or DOMDocument-based stuff) Write some code to write the database statements. (probably some SQL, depends on your database) Run the database statements. (mysql_query, pg_query, whatever) This is a very vague question, and this list is not normally well disposed to writing people's programs for them, especially when they look like college assignments. Cheers Pete -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML data extraction
Andrew Williams wrote: Best All, How can you best and accurately extract XLM data to DB table. e.g.: Use XSLT to generate SQL INSERT statements. /Per -- Per Jessen, Zürich (11.3°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML data extraction
@Jessen I read your answer and... You have any article speaking about that you are saying? Regards, Igor Escobar systems analyst interface designer www . igorescobar . com On Thu, Apr 2, 2009 at 8:38 AM, Per Jessen p...@computer.org wrote: Andrew Williams wrote: Best All, How can you best and accurately extract XLM data to DB table. e.g.: Use XSLT to generate SQL INSERT statements. /Per -- Per Jessen, Zürich (11.3°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML data extraction
Igor Escobar wrote: @Jessen I read your answer and... You have any article speaking about that you are saying? Hi Igor I don't have anything handy, but there's plenty of good material on the internet about XSLT. The main point is - XSLT is just reformatting the data from XML format to a text format suitable for use as insert SQL insert statements. All you need to do is write the stylesheet that takes format1 and converts it to format2. If you've not dealt with XSL before it can be a little daunting, but I think you'll get the idea fairly quickly. /Per -- Per Jessen, Zürich (14.3°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php