XML

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

XML

Post by Luke »

What do y'all use it for? I have yet to find a use, but then again I haven't really looked into it much. I do a lot of eCommerce sites and standard info sites. Is it worth looking into?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Google is your friend:

http://www.google.ca/search?hs=xja&hl=e ... arch&meta=

This is a really informative thread I found in that search that explains it very well:

http://forums.devx.com/showthread.php?t=4660
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Re: XML

Post by Roja »

The Ninja Space Goat wrote:What do y'all use it for? I have yet to find a use, but then again I haven't really looked into it much. I do a lot of eCommerce sites and standard info sites. Is it worth looking into?
Its definitely worth looking into, and its becoming the new standard language for "Web 2.0" (definition varies).

I use it for my db schema's. Its a little larger than a standard schema file, but its much more descriptive, and far more portable. I can use the xml to draw db relationships, and much more. Its incredibly useful. Read more about adodb's xmlschema.
sheila
Forum Commoner
Posts: 98
Joined: Mon Sep 05, 2005 9:52 pm
Location: Texas

Re: XML

Post by sheila »

The Ninja Space Goat wrote:What do y'all use it for?
I had to use it to pass data to a Flash app. Flash sends a request to a PHP script. PHP hits the database and returns XML that Flash then uses to change what it shows the user.
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

We've had this discussion before, too:
viewtopic.php?t=36657
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

I must confess, however, I still don't see how it could be useful for me.

I'm currently building a discussion board, and I thought about making the threads in XML.

Then I thought: Why?
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Depends on entirely what sort of apps you make. And if one is planning to make a career out of PHP programming, then I'd definately recommend learning it and using it by making practice apps.

One popular example is if an RDBMS is not used in a project, you could use XML instead of a CSV text file.

I have a few old projects that run strictly on text files so when/if I ever revamp them to modern standards, XML is something I'd definately use.

Another is 3rd party data importing and exporting. If you create an application that imports and exports data through text files, XML is a solution I'd recommend over CSV text files again.

The ability to basically create your own markup language and completely customize the values makes reading the raw data so much easier if it ever required human editing.

eg.
<clients>
<client>
<iDNo>02942</iDNo>
<name>John</name>
....
</client>
...
</clients>

beats the heck out of
02924, John, ..., ...
02925, Joe, ..., ...
02926, Bob, ..., ...


And PHP gives you the ability to basically just import the file and then have all of the tags in an array. So simplicity and scalability and clarity I think are big bonuses in XML usage.


But for a more comprehensive listing of reasonings why, I'd recommend checking out the links posted above.
Last edited by m3mn0n on Thu Dec 01, 2005 5:19 am, edited 1 time in total.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

Sami wrote:One popular example is if an RDBMS is not used in a project, you could use XML instead of a CSV text file.
That's a very bad example. XML is certainly not the best choice for a flat file storage system .. nor is CSV. You should work out a format that best suits the data being stored. The processing overhead for XML is hefty at best, not to mention the storage overhead.

XML is for transfering data between computers where you don't have the ability to work out a more suitable structure. Data feeds are a typical example .. if you're feeding some data to lots of people you don't know then you need a format that defined in a way that everyone can easily use .. such as XML.
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

I respectfully disagree.
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

The only use I have made of XML thus far is to transfer data between different applications, in a common (standard) format.
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

So perhaps (from a discussion board point of view) I could output (say) the latest updated threads in XML so people could include them easily on their front page.
Right?
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

Yup: RSS feeds.
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

I do that already, but that's different, isn't it?

(I know their XML based)
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

I've yet to encounter XML, and I don't even understand what it is. Normally I'd be intrigued to click those links and read more, but my brain is on overload from learining how to SSH on my freebsd box. Plus I've done so much work lately that my brain is fried. Now is one of those times where I could use a break from everything, but I know I'll never get around to it. :-P
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Grim... wrote:I do that already, but that's different, isn't it?

(I know their XML based)
Well essentially, it's one and the same thing since RSS is a form of XML (much like XHTML is a form of XML) so adding an RSS field would count as having an XML element in the application :wink:
scrotaye wrote:I've yet to encounter XML, and I don't even understand what it is. Normally I'd be intrigued to click those links and read more, but my brain is on overload from learining how to SSH on my freebsd box. Plus I've done so much work lately that my brain is fried. Now is one of those times where I could use a break from everything, but I know I'll never get around to it. :-P
The weekend is near, my friend! :D

We shall all rejoice when Friday afternoon is upon us! :)
Post Reply