Web Analytics Made Easy -
StatCounter Xml?? - CodingForum

Announcement

Collapse
No announcement yet.

Xml??

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Xml??

    What the heck is XML good for? any practical applications would be enjoyed.
    i'm only 12, gimme some slack

  • #2
    Oh, how about Mozilla Firefox? The entire user interface is written in XUL (a XML language), XBL (another XML language) and JavaScript.

    Generic XML -- that is XML that isn't written in a specific XML language -- is typically only useful as a format for exchanging data.

    Try reading this thread, especially near the end: http://www.codingforum.net/showthread.php?t=11642
    "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
    June 30, 2001
    author, ES-Membrane project (Github Pages site)
    author, Verbosio prototype XML Editor
    author, JavaScript Developer's Dictionary
    https://alexvincent.us/blog

    Comment


    • #3
      It helps to describe data really. For instance you have Docbook which describes a set of XML tags for marking up books and articles. XML is also used by SOAP, a web services format. There is an XML format for RDF, which describes relationships between resources. Try reading XML.com, they should be able to explain it better.
      Forget style. Code to semantics. Seperate style from structure, and structure from behaviour.
      I code to specs, and test only in Firefox (unless stated otherwise).

      Comment


      • #4
        It will be the next level of data exchange, the core of some other data type like RSS, atom, etc.

        Comment


        • #5
          ok. so, i have a document (info.xml)
          this is its content:
          Code:
          <letter>
          <to>Bob</to>
          <from>Sally</from>
          <date>Wednesday, August 3rd, 2005</date>
          <content>Paris is nice.  The post office fees are outrageous though!  Call me!</content>
          </letter>
          How could I insert this bit into an html doc? Why the heck would I want to?
          i'm only 12, gimme some slack

          Comment


          • #6
            Originally posted by ianmarlowe
            Why the heck would I want to?
            That is the most important question about using XML in any application. I'm not knocking XML. I'm emphasizing that you must have a "need" for XML -- or at least a very strong incentive -- before you should use it.

            XML is not the Swiss Army Knife of web development. You, the developer, are. It's up to you to decide if you need to use XML or not, and why.

            That said, there's any number of ways you could do it. PHP is one way, if you don't want to do it on the client-side.
            Last edited by Alex Vincent; Aug 3, 2005, 03:18 AM.
            "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
            June 30, 2001
            author, ES-Membrane project (Github Pages site)
            author, Verbosio prototype XML Editor
            author, JavaScript Developer's Dictionary
            https://alexvincent.us/blog

            Comment


            • #7
              so, let's say i have:
              Code:
              <data>
              <name>
              Bob Edward Patton
              </name>
              </data>
              how could I turn that information into output? How could I make a script need that information?
              i'm only 12, gimme some slack

              Comment


              • #8
                In ASP
                The full code is commented here ..only the first three lines are necessary to load the xml doc though
                Code:
                <%
                'This is the xmldom object we are telling the server that we will be working with xml
                
                set xmlDoc=CreateObject("Microsoft.XMLDOM")
                
                'this line tells the server not to look for updated versions of this file while it is open
                xmlDoc.async="false"
                
                'whatever xml page you wanna load you can change the filename to match yours with a querystring on your redirect statement
                
                xmlDoc.load("mypage.xml")
                
                set x=xmlDoc.getElementsByTagName("Data")
                'from now until the last tag
                
                for i = 1 to x.length
                If childNode.NodeName="Name" Then
                'If its not bob then dont work
                If childNode.NodeValue<>"Bob Edward Patterson" Then
                 	 'you can either give them a message or redirect them.. 
                              'here the message is active  
                              Response.Write("Its Not Bob<br>")
                              'Response.Redirect("errorpage.asp")  
                                Else
                             Response.Write(childNode.NodeValue)
                 	End If
                            Else
                 Response.Write("Node Not Found")
                End If
                Next
                
                %>

                Comment


                • #9
                  We use XML heavily, by using a rigid Schema to validate upon, developers can minimize the amount of syntax required to render multiple output formats for our multimedia applications.

                  Comment

                  Working...
                  X