Results 1 to 10 of 10

Thread: What is the purpose of XML?

  1. #1
    Join Date
    Jun 2008

    What is the purpose of XML?

    What can this language do that others such as HTML, CSS, or PHP can't do?

  2. #2
    Join Date
    Mar 2005
    Sydney, Australia
    The latest version of Microsoft Office now uses XML for its file formats. They are Word documents and Excel spreadsheets etc and not web pages and so can't use HTML but they can use XML because you can define whatever tags you need with XML and are not limited to those just for web pages.

    You can also have information stored as XML that is fed through one filter to create a web page of that content and a completely different filter to produce the same content for a completely different media.

    XML is also the ideal intermediate format for transferring data between any other formats. Say you have 10 different programs that need to be able to share data and each has its own proprietary format. To convert from any one proprietary format to any other directly would require 90 different filters to do the possible conversions. Converting to and from XML would only require 20. There are a lot more than 10 different programs in the world that people want to share data between.

  3. #3
    Join Date
    May 2008
    felgall essentially explained the uses for it. The concept is that XML is a text-based data storage method. You can use whatever markup you want:
    <inventory xmlns="urn:ABCo">
        <item invNumber="38C-192" name="Lid - 32oz Coffee">
            <description>Lids for 32oz coffee cups</description>
        <item invNumber="08N-231" name="Napkins - White">
            <description>8oz pkg. of white pre-folded napkins</description>
    Simple, right? Elements or attributes, it doesn't matter. They could have been done just as easily either way. Sometimes it makes more sense to use one instead of the other, but occasionally the choice isn't terribly easy.

    You can define a grammar using an XML DTD, an XML Schema, a Relax NG schema, or any combination thereof, so that any document created using that format must conform specifically to that grammar.

    You can transform it into HTML, XML, XHTML or possibly even a simple text format like CSV using XSLT documents.

    You can still style it using CSS as well.

    I will say that XML languages are not programming languages, per se, like PHP or C++ are. Things like XPath are simply tools used to aid in the programming aspect of using the XML document. XSLT is simply an XML-based grammar used to manipulate the way XML should be rendered.

  4. #4
    Join Date
    Jun 2008

    Ultimate Purpose of XML

    Encode (mark up) data only once (not once per product)
    Construct many products from that markup
    Reuse data (in whole or part) many times
    print publications
    websites and online syndication
    ebooks and publishing to other devices (PDAs)
    electronic archives for search and reuse
    new product opportunities

  5. #5
    Join Date
    Oct 2007
    To be honest, you're unlikely to get any "epiphany moments" until you actually start using it. And I don't mean you make an inventory of your personal library and then sit back and look at a screen full of XML. That's not really putting it to use. I mean making that data DO something. And believe me, there are thousands of applications designed to take XML inputs and deliver it as outputs.

    The easiest thing to do IMO is to make some XML, link an XSLT to it, and then turn it into a web page (XHTML). Beyond that, the sky's the limit, but XSLT is one of the earliest and easiest things you can use to make your XML DO something. Believe me, you're not going to develop an appreciation for the technology if you're not doing something with it. I know that was my biggest hurdle.

    In web development, XML can be useful by being dynamically generated on the server, sent to the client browser along with an XSLT, and recompiled into (X)HTML on the client side, taking some burden off the server.

    Personally, I find XSL's ability to script JavaScript makes working with XML data down right fun. Possibilities are endless here. And pretty much everywhere else.

  6. #6
    Join Date
    Mar 2005
    Sydney, Australia
    The 'epiphany moment' will most likely occur when you set up a second XSLT that converts the XML into another format (such as a Word document) allowing you to have the same XML source producing 2 (or 1,000) different formats for the same data so that it can be used everywhere you need to without having to rewrite anything. Make changes to the XML and all the different formats are updated automatically.

  7. #7
    Join Date
    Jul 2008
    You guys seem to be very knowledgeable in XML, so can you shed some light on how the search engines can deal with dynamically rendered pages from XML data files? I'm planning a wikipaedia-type site and really need to get a handle on this.


  8. #8
    Join Date
    Aug 2007
    Just make sure that you use GET variables to dynamically load the page, not POST. As far as I know, GET will be indexed, POST will not.

  9. #9
    Join Date
    Sep 2004
    At the corner of WALK and DONT WALK
    One use I found for XML was containing information to be parsed with PHP. There is absolutely no presentation information for this type of file; that is not its purpose. Its purpose is to contain commentary too long to be easily edited in PHPMyAdmin

  10. #10
    Join Date
    Oct 2007
    Quote Originally Posted by felgall
    ... allowing you to have the same XML source producing 2 (or 1,000) different formats for the same data so that it can be used everywhere you need to without having to rewrite anything.
    Also another awesome feature of XML. The idea that content should be separate from form is embodied in XML. One content source, thousands of potentially different formats.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.10370 seconds
  • Memory Usage 2,933KB
  • Queries Executed 13 (?)
More Information
Template Usage (34):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (10)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (70):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates