bearsdenred
11-23-2004, 12:55 AM
Hello wondering if you guys can help me understand all about XML XSL and DTD's
i bought a book on XML "XML by example" by Marchal Benoit and i cant make head or tail of the problems im facing creating a XML store.
Heres my problem.
I want to create a XML document to store, say a stock list of CD's for a e-commerce site. this file needs to be searched, and added to..
heres an example of my coding so far.... please dont laugh, im not a programmer. :(
=============
Stock XML
<!DOCTYPE stock SYSTEM "stock.dtd">
<stock id="555-12-3434">
<title>Fifa 2005</title>
<format>PCCD</format>
<description>Football Game</description>
<code>EA3323</code>
<price>£29.99</price>
<gene>Football</gene>
</stock>
============
DTD
<!-- Stock,DTD -->
<!ELEMENT stock (title, format, description, code, price, gene)>
<!ATTLIST employee
id CDATA #REQUIRED>
<!ELEMENT title (#PCDATA)>
<!ELEMENT format (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT code (#PCDATA)>
<!ELEMENT price (#PCDATA)>
<!ELEMENT gene (#PCDATA)>
Im i missing a lot of information? are these genuie XML documents? any help appreicated.. :)
i bought a book on XML "XML by example" by Marchal Benoit and i cant make head or tail of the problems im facing creating a XML store.
Heres my problem.
I want to create a XML document to store, say a stock list of CD's for a e-commerce site. this file needs to be searched, and added to..
heres an example of my coding so far.... please dont laugh, im not a programmer. :(
=============
Stock XML
<!DOCTYPE stock SYSTEM "stock.dtd">
<stock id="555-12-3434">
<title>Fifa 2005</title>
<format>PCCD</format>
<description>Football Game</description>
<code>EA3323</code>
<price>£29.99</price>
<gene>Football</gene>
</stock>
============
DTD
<!-- Stock,DTD -->
<!ELEMENT stock (title, format, description, code, price, gene)>
<!ATTLIST employee
id CDATA #REQUIRED>
<!ELEMENT title (#PCDATA)>
<!ELEMENT format (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT code (#PCDATA)>
<!ELEMENT price (#PCDATA)>
<!ELEMENT gene (#PCDATA)>
Im i missing a lot of information? are these genuie XML documents? any help appreicated.. :)