use of XML
- Started
- Last post
- 15 Responses
- unknown
i was looking into XML, and I was wondering what it can used for?
Sorry maybe dumb question, but I just don't get it. Can you guys give me some application it can used in.
- toastie0
there are infinite potential uses for XML, from config files to databases.
As an example, I use it as databases for the sites I build, so instead of static HTML pages, I have a perl script take the data from the XML file and generate the pages from that. This way the content can be updated via a control panel in the same script.
You dont technically need XML for that, but XML is a standard, and this way the XML database can be accessed from an outside source if you wish. Like news and stock tickers for example, usually get their data from external XML sources.
- frankbb0
do you have link for that perl script??
or have you written it for yourself.. if so.. any chance of a look..
i would love to see that..
- toastie0
frankbb: Look at the CPAN perl module archive, there are a number of XML helper modules, which are a piece of cake to use if you know basic perl. I usually use XML::Simple, which is really nice. The only problem with it is that it's not standard on most servers, so you have to get em to install it, which requires installing an external program called expat, and not all webmasters are up for doing that.
- unknown0
hmmm....is there any place i take look for more application uses of XML. cause I want to know what else can be done with it.
Thanks.
- frankbb0
I use xml for menu systems and content.. in a sort of a crude database fashion. I really like except (until now) i couldn't update it on line, which would be really good for clients and me;)
a lot of people use it as a way of storing newsfeeds, that way other people can gain access to a file which can then be draw in different ways. i.e. someone could use your data in flash or html and so on, very easily, without asking for permissions, as normally it is a read only. Unlike really databases that require the setup of a file that can gather the data i.e. php or asp and so on..
- cinder0
It's formatting for information.
It doesn't 'do' anything.It's just an extensible type of data structure
- mike0
like |toastie| said, it has infinite useage potential. xml is simply a standardized means of structuring and defining data that is lightweight and very portable. often you can create xml streams of content to syndicate data and information or share it secureley for such things as financial exchange and all sorts of EDI applications. look at how it works with flash, that is a perfect example, it is a vehicle independent means of passing structured data.
- squidfingers0
Here's an example of flash using XML.
Here's the XML... http://dev.squidfingers.com/slid…
and here's the Flash movie that uses it... http://dev.squidfingers.com/slid…
The navigation in the Flash movie is created dynamically from the XML file, so I can add images and text to the Flash movie without re-publishing the Flash file. All I need to do is just add a couple nodes to the XML.
- keiTai0
squidfingers, nice lash movie.
But why do you use <![CDATA[ in your xml file?? What's the function?
- tomkat0
hey squidfingers..
i love the stuff on your site..
great influentia..=)
- squidfingers0
I use XML so I can update the content of my Flash projects easier.
- monNom0
it's kind of a write once, read anywhere sort of thing...
Suppose you want to be able to keep an archive of data, be it stories or stock data or whatever, stick that data into XML files, then using XSLT, or a sever side script, you can spit it out in any way you want... send it out to flash, send it out as a PDF document, send it out as a website... make your website look entirely different and and all your data is independant of the styling and layout (similar to linked CSS files, they make things easy to update)... there's a million and one uses for it...some better than others (I think flash remoting is probably way bettter for transfering data to flash than XML is... XML takes FOREVER!)
sorry, I'm digressing... it just makes updates REALLY easy... if a client wants to go to flash, from html, you just need to build the flash file to read that data and display it... if the client wants to go back to HTML, you don't have to use legacy data, or pull it back out of flash... you just use the same XML and spit it out differently with an updated XSLT file(or files)...
it seems like really handy stuff... for some purposes... I don't think it really makes sense for a portfolio site, or a blog, but it definitely makes sense for large scale, content rich sites which might have a custom CMS system built for them.
does anybody know of a quality XML based CMS system for cheap?
that's the only problem I see with it.. in order to update XML, you need to get nitty gritty with it, and because it's seperate from the style, it's hard to look at for those not code-inclined.
- quik0
you should have searched the pvan before posting this one ;)
- sparker0
you know those little boxes on the wall that control the HVAC and environment/climate systems in buildings...when i worked at my previous employer we wrote firmware and software that controled those boxes and systems. we used xml to hold not only the ui on those boxes, but to also stream system config data back and forth from the hvac units to the control boxes and to computer terminal software that tracked building statistics (like temp, humidity, etc).
it was a two year long development project bringing that inhouse, but xml made it a lot easier and more uptodate than the older sytems in place.
now, all that data is easily transferrable to any device...wireless devices, computer software, other hvac controllers...etc.
so, there is a real world, pratical application of xml and it's technologies that doesn't envolve just web crap. there is more out there than the web, and xml is able to work with just about anything.
linux uses xml for some config files now. some window managers (like fluxbox) use to describe the look and feel of the os theme.
xml is beautiful. :)