Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
|
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 16th, 2004, 03:08 AM
Registered User
 
Join Date: Sep 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Parsing Microsoft generated XML

Hi

I'm trying to extract data from an XML file. I'm not having much sucess. The file is produced in a version of XML that is from Microsoft (I think).

The header is <xml xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">

The tags begin - <rs:data>
then <z:row id_property="2010" location="Nueva Andalucia".........price_med="0" />

Can anyone tell me if PHP can parse this sucessfully please? If not i can give up!

 
Old September 16th, 2004, 04:45 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Yes, it can. What you're seeing there are namespaces. Namespaces allow other markup languages to be utilized in XML documents, and is part of a W3C standard.

If I were you I'd start with PEAR to find an already built XML parsing package. http://pear.php.net.

HTH!


Regards,
Rich

--
[http://www.smilingsouls.net]
[http://pear.php.net/Mail_IMAP] A PHP/C-Client/PEAR solution for webmail
 
Old September 16th, 2004, 04:55 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

BTW: regardless of the type of file, you can conceivably parse any type of file using PHP, anything from .mp3 audio to plain text. Of course, the more complicated the file format, the more complicated the script will be. PHP is often used for simple text files since it is optimized for that use, but as a programming language, really, the sky's the limit. :-)

Regards,
Rich

--
[http://www.smilingsouls.net]
[http://pear.php.net/Mail_IMAP] A PHP/C-Client/PEAR solution for webmail
 
Old September 16th, 2004, 06:11 AM
Registered User
 
Join Date: Sep 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Many thanks, richard. I'll struggle on!






Similar Threads
Thread Thread Starter Forum Replies Last Post
Parsing the xml which is having vikkiefd XML 14 July 28th, 2008 05:21 AM
XML parsing denzil_cactus Perl 0 June 11th, 2007 02:34 AM
XML Parsing SCADA_Monkey XML 2 March 11th, 2007 03:20 PM
Casting XML Generated Class rodmcleay .NET Web Services 0 November 13th, 2006 11:44 PM
setting content type of asp generated xml whyulil Classic ASP XML 0 July 15th, 2005 04:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.