Make your own free website on Tripod.com

XML:

XML : Dil Yapilari

XML Ornegi: Booklist ornegi:

<? XML version=“ 1.0” standalone=“ yes”?>

<! DOCTYPE BOOKLIST SYSTEM “booklist. dtd”>

<BOOKLIST>

<BOOK genre=“ Fiction”>

<AUTHOR>

<FIRST> Milan</ FIRST>< LAST> Kundera</ LAST>

</ AUTHOR>

<TITLE> Identity</ TITLE>

<PUBLISHED> 1998</ PUBLISHED>

<BOOK genre=“ Science” format=“ Hardcover”>

<AUTHOR>

<FIRST> Richard</ FIRST>< LAST> Feynman</ LAST>

</ AUTHOR>

<TITLE> The Character of Physical Law</ TITLE>

</ BOOK></ BOOKLIST>

           

XML:DTDs

DTD Ornegi:

       

<! DOCTYPE BOOKLIST [

<! ELEMENT BOOKLIST (BOOK)*>

<! ELEMENT BOOK (AUTHOR, TITLE, PUBLISHED?)>

<! ELEMENT AUTHOR (FIRST, LAST)>

<! ELEMENT FIRST (# PCDATA)>

<! ELEMENT LAST (# PCDATA)>

<! ELEMENT TITLE (# PCDATA)>

<! ELEMENT PUBLISHED (# PCDATA)>

<! ATTLIST BOOK genre (Science| Fiction) #REQUIRED>

<! ATTLIST BOOK format (Paperback| Hardcover) “Paperback”>

]>

 

 XML- QL Ornegi:

    WHERE

    <BOOK>

    <NAME>< LAST>$ 1</ LAST></ NAME>

    </ BOOK> in “www. booklist. com/ books. xml

    CONSTRUCT <RESULT> $1 </ RESULT>

Daha Komplike bir ornek:

        WHERE <BOOK> $b <BOOK> IN

        “www. booklist. com/ books. xml”,

        <AUTHOR> $n </ AUTHOR>

        <PUBLISHED> $p </ PUBLISHED> in $e

        CONSTRUCT

        <RESULT>

        <PUBLISHED> $p </ PUBLISHED>

        WHERE <LAST> $l </ LAST> IN $n

        CONSTRUCT <LAST> $l </ LAST>

        </ RESULT>

Bu bilgiler Stanfod Universitesindeki Sanal kitaplarinbirinden" alinmistir.

*Database Management Systems, 2 nd Edition. R. Ramakrishnan and Johannes Gehrke