Results 1 to 10 of 10

Thread: nak display xml gune html bleh ke?

  1. #1
    Join Date
    Jun 2002
    Location
    pandan jaya
    Posts
    1
    Rep Power
    0

    Unhappy nak display xml gune html bleh ke?

    a'kum. caner aku nak display xml gune html? tulongg...

  2. #2
    Join Date
    Jul 2001
    Location
    KL, Malaysia
    Posts
    277
    Rep Power
    223
    Hmm... what do you mean?
    you can simply view a xml file in your browser, why would you need html?

  3. #3
    Join Date
    Dec 2001
    Location
    kl
    Posts
    11
    Rep Power
    0
    To transform XML to HTML, you need Extensible Stylesheet Language (XSL). XSL specifies a language definition for XML data presentation and data transformations. Data presentation means displaying data in some format and/or medium. Presentation is about style. Data transformation means parsing an input XML document into a tree of nodes, and then converting the source tree into a result tree. Transformation is about data exchange.


    Example:
    PHP Code:
    <!--XML (hello.xml)-->
    <?xml version="1.0"?>
    <?xml
    -stylesheet type="text/xsl" href="hello.xsl"?>
    <hello-world>
       <greeter>An XSLT Example</greeter>
       <greeting>Welcome To WebmasterMalaysia, by Acurra79</greeting>
    </hello-world>

    PHP Code:
    <!--XSLT (hello.xsl)-->
    <?xml version="1.0"?>
    <xsl:stylesheet 
          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
          version="1.0">
       <xsl:template match="/hello-world">
           <HTML>
             <HEAD>
               <TITLE></TITLE>
             </HEAD>
             <BODY>
                <H1><xsl:value-of select="greeting"/></H1>
                <xsl:apply-templates select="greeter"/>
             </BODY>
           </HTML>
       </xsl:template>
       <xsl:template match="greeter">
           <DIV>from 
               <I><xsl:value-of select="."/></I>
           </DIV>
       </xsl:template>
    </xsl:stylesheet>
    Last edited by kpyew; 27-06-2002 at 03:53 PM.

  4. #4
    Join Date
    Dec 2001
    Location
    kl
    Posts
    11
    Rep Power
    0
    Sorry, the example cannot be displayed, email me if you need it.

  5. #5
    Join Date
    Nov 2001
    Location
    Johor
    Posts
    772
    Rep Power
    230
    kalau tak leh gak... test yang nih


    xml_style.css
    =========
    CATALOG
    {
    background-color: #ffffff;
    width: 100%;
    }
    CD
    {
    display: block;
    margin-bottom: 30pt;
    margin-left: 0;
    }
    TITLE
    {
    color: #FF0000;
    font-size: 20pt;
    }
    ARTIST
    {
    color: #0000FF;
    font-size: 20pt;
    }
    COUNTRY,PRICE,YEAR,COMPANY
    {
    Display: block;
    color: #000000;
    margin-left: 20pt;
    }


    catalog.xml
    ========
    PHP Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <?xml
    -stylesheet type="text/css" href="xml_style.css"?>
    <CATALOG>
      <CD>
        <TITLE>Empire Burlesque</TITLE>
        <ARTIST>Bob Dylan</ARTIST>
        <COUNTRY>USA</COUNTRY>
        <COMPANY>Columbia</COMPANY>
        <PRICE>10.90</PRICE>
        <YEAR>1985</YEAR>
      </CD>
      <CD>
        <TITLE>Hide your heart</TITLE>
        <ARTIST>Bonnie Tyler</ARTIST>
        <COUNTRY>UK</COUNTRY>
        <COMPANY>CBS Records</COMPANY>
        <PRICE>9.90</PRICE>
        <YEAR>1988</YEAR>
      </CD>
    </CATALOG>
    heheh sorry la lambat reply!... kalau nak tau lagi... tanya pakcik google lah.... XSL pun leh displaykan XML
    Last edited by hymns; 22-10-2003 at 12:23 AM.
    I hate when:

    vBulletin Message:
    Sorry! The administrator has specified that users can only post one message every 60 seconds

  6. #6
    Join Date
    Feb 2003
    Location
    Kluang, Johor
    Posts
    2,367
    Rep Power
    246

  7. #7
    Join Date
    Jun 2003
    Location
    Papar, Sabah
    Posts
    266
    Rep Power
    201
    kalo code XML untuk buat skin winamp3 tu camner yek? aku teringin la nak buat satu..

  8. #8
    Join Date
    Nov 2001
    Location
    Johor
    Posts
    772
    Rep Power
    230
    use generator lah!
    I hate when:

    vBulletin Message:
    Sorry! The administrator has specified that users can only post one message every 60 seconds

  9. #9
    Join Date
    Oct 2003
    Location
    on Earth
    Posts
    21
    Rep Power
    0
    APA KELEBIHAN xml NI ?

  10. #10
    Join Date
    Nov 2001
    Location
    Johor
    Posts
    772
    Rep Power
    230
    bleh stor data kalau x mo guna dbase dan ape jua yg leh guna ngan xml... =)
    I hate when:

    vBulletin Message:
    Sorry! The administrator has specified that users can only post one message every 60 seconds

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. bleh komen tak website ni..
    By barnawi in forum Showcase
    Replies: 6
    Last Post: 29-01-2009, 01:27 AM
  2. camne nk create PDF gune PHP???
    By kuumasang_n33 in forum Website Programming
    Replies: 4
    Last Post: 05-03-2008, 02:01 AM
  3. gune SSL dalam ASP
    By talapia in forum Website Programming
    Replies: 4
    Last Post: 23-02-2008, 02:17 AM
  4. php bleh run ngan pws kan?
    By therion in forum Website Programming
    Replies: 34
    Last Post: 27-01-2004, 05:47 PM
  5. mail () display all html codes
    By joyce in forum Website Programming
    Replies: 8
    Last Post: 23-09-2002, 04:36 PM

Posting Permissions

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

Search Engine Optimization by vBSEO 3.5.0 RC1 PL1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32