Ask Experts Questions for FREE Help !
Ask
    Moriahbug's Avatar
    Moriahbug Posts: 1, Reputation: 1
    New Member
     
    #1

    Nov 21, 2011, 12:17 PM
    I need to write an XML DTD- HELP!
    This is what I have so far for my code. I attempted a DTD, but I don't know if this is right. Can someone help me write a DTD for my code? I'm new at this, so I'm sorry in advance if I don't get it right off the bat!

    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <!DOCTYPE catelogs

    [

    <!ELEMENT catelogs (qtyelement, catelog )>

    <!ELEMENT company (mainqty, catnbr, itemdesc, itemcost)>

    ]>
    <?xml-stylesheet type="text/css" href="CatelogDescriptions.css" ?>
    <?xml-stylesheet type="text.css" href="invoices.css" ?>
    <!--
    Name: Moriah King
    Lab Number: 7
    Well formed: yes
    Valid: Yes
    Other Browser: Google Chrome
    -->
    <!-- This document is for catelog item -->



    <catelogs>
    <qtyelement>3</qtyelement>
    <catelog>
    <company>®Signature Photography</company>
    <mainqty>3</mainqty>
    <catnbr>CSDR415</catnbr>
    <itemdesc>Model D3 Toykon DSLR camera</itemdesc>
    <itemcost>1699.99<qty>1</qty></itemcost>

    <catnbr>AQUF895</catnbr>
    <itemdesc>Raystop UV filter</itemdesc>
    <itemcost>295.95<qty>2</qty></itemcost>

    <catnbr>TBLS452</catnbr>
    <itemdesc>Model v400 Toykon lens</itemdesc>
    <itemcost>449.95<qty>1</qty></itemcost>
    </catelog>

    <catelog>
    <company>®Deep Water Aquariums</company>
    <mainqty>5</mainqty>
    <catnbr>TFDI104</catnbr>
    <itemdesc>Tandom 50 gal tank</itemdesc>
    <itemcost>23.95<qty>3</qty></itemcost>

    <catnbr>TFFD413</catnbr>
    <itemdesc>Bora Trop Fish food</itemdesc>
    <itemcost>14.65<qty>1</qty></itemcost>

    <catnbr>TFCR007</catnbr>
    <itemdesc>Bora 50 gal tank filter</itemdesc>
    <itemcost>1.50<qty>1</qty></itemcost>

    <catnbr>TFSC738</catnbr>
    <itemdesc>Amazon sword plant</itemdesc>
    <itemcost>4.95<qty>1</qty></itemcost>

    <catnbr>TFGR109</catnbr>
    <itemdesc>40 lbs natural gravel</itemdesc>
    <itemcost>6.48<qty>2</qty></itemcost>
    </catelog>

    <catelog>
    <company>®Toy Soldiers</company>
    <mainqty>1</mainqty>
    <catnbr>CSLN053</catnbr>
    <itemdesc>Bends model 44 remote control sailboat</itemdesc>
    <itemcost>658.25<qty>1</qty></itemcost>
    </catelog>
    </catelogs>

Check out some similar questions!

Basic XML Schema and Valid XML generation [ 1 Answers ]

Hi, I have an XML schema file as below. Creating and parsing the XML results works but I don't understand how to validate. I understand the concept of a namespace but not the implementation. Why do I need to refer to "http://www.w3.org/2001/XMLSchema"? I just want to create a validation based on...

Best XML parser for C [ 1 Answers ]

Hi, My application needs me to parse HUGE XML files. I need to implement it only in C language. Please suggest me a parser for XML in C. I came across libxml2 parser. Libxml2 inturn has 'SAX type' parser and ' XMLReader ' pull parser. Please let me know which among these is better in...

XML query [ 1 Answers ]

Tell me everything about XML.


View more questions Search
 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.