homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

php and xml
parser or parsing xml using php

 3:50 am on Jul 11, 2002 (gmt 0)

I am very interested in xml and parsing it using php ...

I have visited and searched numerous sites, tutorials on this and I would like to know if anyone here have tried it for their site?

is there any parser (php much appreciated) that uses the DTD of the xml file?

how about a forum here that would discuss xml and related x stuff?



 5:24 am on Jul 11, 2002 (gmt 0)

This is something that I have been looking at a little bit too but haven't had a chance to use yet. I keep hoping a project will come up where I can use so I can stick work time on it but no such luck yet.

<added>I think Brett mentioned once that you need enough individual threads to warrant a new forum, it seems to come up in regards to specific scripting languages right now, might not quite be ready yet.


 3:14 am on Jul 12, 2002 (gmt 0)

Hey Copongcopong,
You can count me among the interested. If it weren't for compatability issues with older browsers I would have been hot on this a year ago. :( I just finished a demo page with XHTML and PHP but would have preferred to have built it with full XML. The funny thing is my latest project (my own web site) deals with a ton of information and data sharing. If I didn't have to worry about older browsers it would be perfect for XML. I'm soooooo fed up with non-compliant browsers!!!


 4:11 am on Jul 14, 2002 (gmt 0)

thanks for your reply, well we can say that technology haven't catch up with the standards. Anyway there are still other technology that would accomplish this but I am just intrigue with the power of xml and dtd which would filter information/data in the xml file.

here is one of my wildest idea about xml and dtd.

for example you would create a form that would ask for some data ... instead of php or javascript to filter data input on the form (example strip html tags, etc..) DTD would do this for us ... or my imagination is a litle bit wild about xml and dtd?

anyway its a mark-up language and programmers are the one create a program or script that would use this markup language.

how about a corroborative site project?

just thinking. =)


 7:58 am on Jul 14, 2002 (gmt 0)

I found the PHP’s XML stuff really easy to use. Just go to PHP.net and look at the XML functions. They have some demos there; I tried a few out and they worked great. I have done some integration with XML with UPS and some XML with NSI, both were fun to play with. I am hoping to have another XML project next month. XML is not really a browser thing. It is a background communication thing. I can communicate with a source and then render HTML for the viewer. I have tried some XSL with IE, but what good is XSL when you can't guarantee that everyone is using IE.


 11:40 am on Jul 14, 2002 (gmt 0)

copongcopong, here are a couple of tutorials that are SO simple and clear. They're wonderful.


{love the nickname, BTW)


 12:22 pm on Jul 14, 2002 (gmt 0)

XML is not really a browser thing.

Hold the boat. You're telling me that you used PHP to render the XML for the browser?

aaaaaa - a light bulb just went off. Is it true that only certain browsers will let you see the XML?


 9:15 pm on Jul 14, 2002 (gmt 0)


I think for the time being, that's the solution most people use - you build xml pages and then process it on the server side (PHP being one obvious way) and then you send XHTML to the browser.

You get al the data management advantages of xml

Visitors get all the compatibility advantages of whatever flavor of x/html you choose.

Search engines don't understand the DTDs anyway, so you don't lose anything (i.e there's no search engine that can look at a DTD and know that your "foot" site is about appendages not measurements).


brotherhood of LAN

 9:19 pm on Jul 14, 2002 (gmt 0)

Could someone be so good to provide a little description of the role of XML/XHTML? These are terms I've read many a time, but never looked into why.


 10:24 pm on Jul 14, 2002 (gmt 0)

Search engines don't understand the DTDs anyway

Ergophobe, thanks for the post. But if the SEs don't understand the DTDs why bother with XML? Without the DTD how will the SEs parse my pages?

I'm in the planning stages for a collaborative project that involves XML, an RDF model, RSS feeds and even RPC. Why not just use a PHP/MySQL site instead? What's the advantage - other than RSS & RPC?

BOL XML - [xml.com...]

XHTML - [w3.org...]


 11:19 pm on Jul 14, 2002 (gmt 0)

PHP lets you parse, but not validate XML documents, they use the expat (the same libraries that Perl and Netscape use).

Here is where to go for PHP XML questions, [php.net...]

Think of XML as an instruction media stream with built-in commands that trigger events. You can define handlers for different XML events, when expat see an even occur then it will execute a function.

Here is a good article on the expat that PHP uses [xml.com...]


 12:03 am on Jul 15, 2002 (gmt 0)

Hey Lisa,
Thanks for the post

I still don't understand - sorry to be so dense - what the advantage is of going with XML VS just building a PHP/MySQL application aside from the ability to implement RSS and RPC?

The whole appeal of XML to me is that it allowed me to define data in a DTD which I could allow others creating documents of the same subject matter as mine to use for their web sites. This would set us up for the beginnings of what XML was designed for - structured data, IE: data with a descriptor which tells you what the data is. The DTD would lead us to the bigger picture items like Metadata and SEs that return search results that are dead-on the subject you searched for. If the SEs don't understand the DTD then the whole scheme falls apart. So what's the point of using XML?

I feel like I'm missing the obvious. If your patience hasn't worn thin I'd welcome getting set straight! :)


 12:31 am on Jul 15, 2002 (gmt 0)

thanks for all ur reply and i see that there are questions being answered and questions being born after the answers.

let us not forget that xml is a markup language and it is mainly designed for exchange of data like RSS.

Lorax, this is why others uses RSS instead of simply using mysql/php (but some do get data in mysql, convert it to xml, den use php) i may simply feed ur article or data into my site by simply getting your xml. i think there are other sites that do this. try this one

[wired.com ]

Like DOM which is also a recommendation which could be use for scripting language.

it does not intend to replace html/xhtml and you would need a program (back-end)or scipting language to convert xml to x/html.

Most of program or scripting language available only parse xml but not validate it, where dtd comes into the picture. Anyway, i think that dtd is 1 of the power of xml that programs, script languages have overlooked, or they are still cooking this for us?!?

all i can say is exploring xml would let us dig more farther and further, with all the X's such as xsl, xslt, xpath, etc ... or should i say "excetera" =)

i really need a gud book on this one.

<marcia, thanks for the comment. />


 9:48 am on Jul 15, 2002 (gmt 0)

Im no xml guru but as I understand it you could combine xml and a database to get a high performance website. For example if you have say online account areas without xml someone could log in to their account which would require constant communication with the database to retrieve or update details.

If you introduce xml you could first let them log in to their account then extract their account details to an xml document. They can then work just with that xml document - which will be much smaller (and quicker) than the actual database.

That should give a bit of a performance improvement.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved