Re: XML data extraction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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_EXCHANGE>20</ID_EXCHANGE>
> <CODE_EXCHANGE>FRA</CODE_EXCHANGE>
> <NAME_EXCHANGE>Frankfurt</NAME_EXCHANGE>
> </EXCHANGE>
> -
> <EXCHANGE>
> <ID_EXCHANGE>28</ID_EXCHANGE>
> <CODE_EXCHANGE>LSE</CODE_EXCHANGE>
> <NAME_EXCHANGE>London Stock Exchange</NAME_EXCHANGE>
> </EXCHANGE>
> -
> <EXCHANGE>
> <ID_EXCHANGE>226</ID_EXCHANGE>
> <CODE_EXCHANGE>GER</CODE_EXCHANGE>
> <NAME_EXCHANGE>Xetra</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 893333
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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux