1 / 13

XML

XML. Door Marick Manrho. Inhoud. Wat is XML? De opbouw van XML Wat is XSL? De opbouw van XSL Toepassing RSS. Wat is XML. XML is: Een markup language Gemaakt voor gegevens Kan opgevraagd worden in HTML Wordt opgemaakt met XSL bestand Komt voort uit SGML. De opbouw van XML.

jeneva
Download Presentation

XML

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. XML Door MarickManrho

  2. Inhoud • Wat is XML? • De opbouw van XML • Wat is XSL? • De opbouw van XSL • Toepassing RSS

  3. Wat is XML XML is: • Een markup language • Gemaakt voor gegevens • Kan opgevraagd worden in HTML • Wordt opgemaakt met XSL bestand • Komt voort uit SGML

  4. De opbouw van XML • Root element <?xmlversion=“1.0” encoding="UTF-8" ?> • Eigen tags <voorbeeld> </voorbeeld> <voorbeeld /> • Commentaar <!-- comentaar -->

  5. <element_nameattribute_name="attribute_value">Element Content</element_name> • <recipename="bread" prep_time="5 mins" cook_time="3 hours"> • <title>Basic bread</title> • <ingredientamount="8" unit="dL">Flour</ingredient> • <ingredientamount="10" unit="grams">Yeast</ingredient> • <ingredientamount="4" unit="dL" state="warm">Water</ingredient> • <ingredientamount="1" unit="teaspoon">Salt</ingredient> • <instructions> • <step>Mix all ingredients together.</step> • <step>Knead thoroughly.</step> • <step>Cover with a cloth, and leave for one hour in warm room.</step> • <step>Knead again.</step> • <step>Place in a bread baking tin.</step> • <step>Cover with a cloth, and leave for one hour in warm room.</step> • <step>Bake in the oven at 180(degrees)C for 30 minutes.</step> • </instructions> • </recipe>

  6. Boomstructuur XML / DOM

  7. Wat is XSL? • Opmaak van XML • Meer dan CSS • Kan XML omzetten naar HTML • Twee verschillende types: • XSL:FO XSL FormattingObjects • XSLT XSL Transformations

  8. Opbouw van XSL • Begint met aangepaste XML syntax • Kan elementen opvragen <xsl:value-of select="naam"/> • Sorteren op inhoud <xsl:for-each select="adresboek/persoon" order-by="naam">

  9. <?xmlversion="1.0" ?> • - <xsl:stylesheetxmlns:xsl="http://www.w3.org/TR/WD-xsl"> • - <xsl:template match="/"> • - <html> • - <head> •   <basefont face="Helvetica,Arial" color="#FFCC00" size="+1" /> •   </head> • - <body bgcolor="#000066"> • - <table border="1"> • -<xsl:for-each select="adresboek/persoon" order-by="naam"> • - <tr> • - <tdalign="center"> •   <xsl:value-of select="naam" /> • </xsl:for-each> •   </table> •   </body> •   </html> •   </xsl:template> • </xsl:stylesheet>

  10. Toepassing RSS • Informatie beschikbaar maken • Andere opbouw

  11. <rssversion="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel> <title>beursgegevens</title> <link>http://www.google.nl</link> <description>de beursgegevens van vandaag op de AEX index</description></channel></rss>

  12. EINDE http://canada.esat.kuleuven.be/xmltutorial/hoofdstuk1.htm http://www.informatica-actief.nl/moodle/mod/resource/view.php?id=137 http://flarescue.org/images/graphics/xml-icon.png http://i.techrepublic.com.com/gallery/173832-500-495.jpg

More Related