DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: Running XML

  1. #1
    mud2 Guest

    Running XML


    From a rank beginner..go ahead, flame me!
    I have WIN 95 and IE5. How do I run simple XML's?
    Must the receiver of an XML have parsers, etc to read it?

  2. #2
    mark Guest

    Re: Running XML


    "mud2" <mud2@ix.netcom.com> wrote:
    >
    >From a rank beginner..go ahead, flame me!
    >I have WIN 95 and IE5. How do I run simple XML's?
    >Must the receiver of an XML have parsers, etc to read it?


    Mud2 ,
    You don't run XML - you use it. You don't need a parser but why write
    the code to do it yourself. A parser comes with IE5. What you do need is
    a programming/scripting language to use the parser. VB\VBA\VBScript\etc with
    the MS Parser.

    Mark

  3. #3
    Russell Jones Guest

    Re: Running XML

    I recommend that you download the updated release version of the Microsoft
    parser from MSDN and use that rather than the now obsolete parser that
    shipped with IE5.

    Russell Jones
    Sr. Web Development Editor,
    DevX.com

    "mark" <mnuttall@nospam.com> wrote in message
    news:3b557dfd$1@news.devx.com...
    >
    > "mud2" <mud2@ix.netcom.com> wrote:
    > >
    > >From a rank beginner..go ahead, flame me!
    > >I have WIN 95 and IE5. How do I run simple XML's?
    > >Must the receiver of an XML have parsers, etc to read it?

    >
    > Mud2 ,
    > You don't run XML - you use it. You don't need a parser but why write
    > the code to do it yourself. A parser comes with IE5. What you do need is
    > a programming/scripting language to use the parser. VB\VBA\VBScript\etc

    with
    > the MS Parser.
    >
    > Mark




  4. #4
    anthony Guest

    Re: Running XML


    Another beginner:
    Why do you need code to produce the XML?
    Can you not type the XML up by hand?
    How would the code work as well, a basic example would be really nice.
    Anthony

  5. #5
    Russell Jones Guest

    Re: Running XML

    You don't need code to produce the XML--you can do that in any text editor.
    However, it's often very convenient to produce XML programmatically. You can
    also write XSLT in any text editor. But you do need a parser in order to do
    anything with the files. Fortunately, you can get the parsers for free.

    Here's a very basic example, using the default IE parser (the one that ships
    with IE5) using the old XSL namespace. I've written it this way so you don't
    have to do anything except save the two files and load the XML file into IE.
    Save both files into the same directory, and then open the junk.xml file in
    IE.

    HTH
    Russell Jones
    Sr. Web Development Editor,
    DevX.com

    ****** junk.xml *******
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="junk.xsl" ?>
    <items>
    <item id="1">
    <name>Item 1</name>
    </item>
    <item id="2">
    <name>Item 2</name>
    </item>
    <item id="3">
    <name>Item 3</name>
    </item>
    </items>

    ******** junk.xsl *********
    <?xml version="1.0" ?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
    <xsl:template match="/">
    <table align="center" width="60%" border="1">
    <tr><th>ID</th><th>NAME</th></tr>
    <xsl:apply-templates select="items/item"/>
    </table>
    </xsl:template>
    <xsl:template match="item">
    <tr>
    <td><xsl:value-of select="@id"/></td>
    <td><xsl:value-of select="name"/></td>
    </tr>
    </xsl:template>
    </xsl:stylesheet>

    "anthony" <anthony.leung@virgin.net> wrote in message
    news:3b57f745$1@news.devx.com...
    >
    > Another beginner:
    > Why do you need code to produce the XML?
    > Can you not type the XML up by hand?
    > How would the code work as well, a basic example would be really nice.
    > Anthony




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
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center