TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   XML, XSLT, XPath, XQuery (http://www.talkphp.com/xml-xslt-xpath-xquery/)
-   -   XML only good for RSS? (http://www.talkphp.com/xml-xslt-xpath-xquery/2375-xml-only-good-rss.html)

Orc 02-29-2008 10:43 AM

XML only good for RSS?
 
XML seems really only good for RSS, say you have a Book checking site, that checks newest books out.

And you have an XML file that grabs really simple syndicated feeds, that would be used to grab all the books titles, authors, etc.

Output them on the main site, this rss feed would come from a provider, which I wouldn't know of for books.

But you get my drift, though they also associate XML as a good language for Mobile Phones, and stuff like that.

Though, as XML's main purpose, the possibilities are endless, though I wonder how you would go about importing your own custom tags into HTML documents for your own use.

DeMo 02-29-2008 05:10 PM

There are more uses to XML other than RSS.

You can use it to organize and store simple data like configuration files for your application.
Code:

<screen>
  <width>1024</width>
  <height>768</heigth>
</screen>

Let's say you're creating a CMS or a Blog system and you have a plugin architecture that users can use to enhance the functionality of the product. You can define that plugins for your system must come with a info.xml file following this structure:
Code:

<plugin>
  <name>My Plugin</name>
  <author>John Doe</author>
  <description>This plugin is useless</description>
  <version>1.0</version>
  <releasedate>01/01/2008</releasedate>
</plugin>

This would make it a lot easier for you to extract info from each installed plugin.

XML is also used as a data interchange format. Take AJAX as an example, the X in AJAX stands for "XML" because the data is commonly returned in XML format. Sometimes you need to export data from some place to import it in another, in this case you can create an exporter that writes the data in XML format and then the importer that reads data from XML files.

Another use is for Web-RPC (Remote Procedure Calls), take a look here for an example, it shows how you can query a BOINC project for user information, the data is returned as XML.

I've listed some of the common uses of XML but there's really a lot more to it than it seems. :-)

Orc 02-29-2008 09:57 PM

Quote:

Originally Posted by DeMo (Post 11715)
There are more uses to XML other than RSS.

You can use it to organize and store simple data like configuration files for your application.
Code:

<screen>
  <width>1024</width>
  <height>768</heigth>
</screen>

Let's say you're creating a CMS or a Blog system and you have a plugin architecture that users can use to enhance the functionality of the product. You can define that plugins for your system must come with a info.xml file following this structure:
Code:

<plugin>
  <name>My Plugin</name>
  <author>John Doe</author>
  <description>This plugin is useless</description>
  <version>1.0</version>
  <releasedate>01/01/2008</releasedate>
</plugin>

This would make it a lot easier for you to extract info from each installed plugin.

XML is also used as a data interchange format. Take AJAX as an example, the X in AJAX stands for "XML" because the data is commonly returned in XML format. Sometimes you need to export data from some place to import it in another, in this case you can create an exporter that writes the data in XML format and then the importer that reads data from XML files.

Another use is for Web-RPC (Remote Procedure Calls), take a look here for an example, it shows how you can query a BOINC project for user information, the data is returned as XML.

I've listed some of the common uses of XML but there's really a lot more to it than it seems. :-)

Isn't this method used by Facebook for Developers? :D XML is awesome!

DeMo 02-29-2008 10:14 PM

I never looked into the Facebook API but it probably uses XML too.
Google likes XML too, take a look at this example, it shows how you can use cURL and XML to automate blog postings in Blogger, in this case you send the data to them formatted in XML.

sketchMedia 03-10-2008 11:35 AM

XML is really a way of organising/storing data when it boils down to it, so the possibilities are up to your imagination i suppose.

Nor 03-13-2008 03:52 PM

I use it for my forum software :)

oscargodson 06-02-2008 06:46 AM

I am creating a full scale CMS tool by just using XML. The point of this is so that people I have a set up like this:

HTML Code:

<website>
  <webpage id="3"> <!-- For changing order on navigations -->
      <title>Title for the Page</title>
      <subhead>Sub head, but this is optional</subhead>
      <content>
        <p>This is the main content</p>
        <p>paragraphs are retained also</p>
      </content>
  </webpage>
</website>

The webpage tag gets created each time someone creates a page. I also use it for my personal site instead of a database. oscargodson.com/portfolio.xml and my web pages take all that information and parses it into an HTML document.

ETbyrne 06-02-2008 03:29 PM

That's a good idea oscargodson! But, please don't bump posts. :-)

oscargodson 06-02-2008 04:36 PM

What do you mean bump? I just replied to it.

ETbyrne 06-02-2008 05:43 PM

When you reply to an older, dead, or resolved thread it is called a bump. And this thread happens to be a couple months old.

Jim 06-05-2008 01:21 PM

I also use XML in my desktop applications, a config file is easy made in it :)

Flash also workes like a charm with XML, my portfolio uses XML to load it's pages!

Orc 06-05-2008 05:25 PM

Quote:

Originally Posted by oscargodson (Post 15088)
I am creating a full scale CMS tool by just using XML. The point of this is so that people I have a set up like this:

HTML Code:

<website>
  <webpage id="3"> <!-- For changing order on navigations -->
      <title>Title for the Page</title>
      <subhead>Sub head, but this is optional</subhead>
      <content>
        <p>This is the main content</p>
        <p>paragraphs are retained also</p>
      </content>
  </webpage>
</website>

The webpage tag gets created each time someone creates a page. I also use it for my personal site instead of a database. oscargodson.com/portfolio.xml and my web pages take all that information and parses it into an HTML document.

Funny, I had the same idea about an XML Forum.

dymyy 10-19-2012 10:03 AM

Hi, been a member of another programming forum http://www.chaussuresnikes-pascher.com/ but came across this one. Thought Id register. I like these vBulletin systems so Im comfortable here. :)


All times are GMT. The time now is 09:34 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0