Download presentation
Presentation is loading. Please wait.
Published byCecilia Shepherd Modified over 9 years ago
1
Introduction to XML Please use speaker notes for additional information!
2
Books in the hall bookcase Talking Animal Thorton Burgess The Adventures of Reddy Fox The Adventures of Peter Rabbit The Adventures of Lightfoot the Deer The Adventures of Buster Bear The Adventures of Jimmy Skunk Pioneer Life Laura Ingles Wilder Little House on the Prairie Colonial Times Alice Turner Curtis A Little Maid of Bunker Hill A Little Maid of Virginia
3
As you can see, I opened books1.xml from my A drive into Netscape. This is how it appears.
4
As you can see, I opened books1.xml from my A drive into Explorer. This is how it appears.
5
I clicked on the minus sign next to subtract and it reduced to just the element SUBJECT. If I click on the plus sign that is now there, the SUBJECT will expand to include the information beneath it.
6
I have now made the ELEMENT for Books in the hall bookcase
7
Books in the hall bookcase Talking Animal Thorton Burgess The Adventures of Reddy Fox The Adventures of Peter Rabbit The Adventures of Lightfoot the Deer The Adventures of Buster Bear The Adventures of Jimmy Skunk Pioneer Life Laura Ingles Wilder Little House on the Prairie Colonial Times Alice Turner Curtis A Little Maid of Bunker Hill A Little Maid of Virginia This XML code is seen using the bookscss.css style sheet. CATEGORY { color:navy; font-size:16pt; font-weight:bold; display:block; } SUBJECT { color:red; font-size:14pt; display:block; } Partial style sheet.
8
CATEGORY { color:navy; font-size:16pt; font-weight:bold; display:block; } SUBJECT { color:red; font-size:14pt; display:block; } AUTHOR { color:green; font-size:12pt; display:block; margin-left:10pt; } TITLE { color:black; font-size:12pt; text-decoration:underline; display:block; margin-left:30pt; }
9
This is from my hard drive. This is from the brinkster web site.
12
Stephen Daniels Sports Reporter 50000 Al Richards Engineering Consultant 95000 Jennifer Ames Foreign Consultant 55000 Sarah Grant Scientific Web 50000 Carl Hersey Foreign Consultant 60000 payroll.xml
13
Fall River Management body { background:beige; } #Page_Header { font-style:bold; font-size: 26pt; text-align:center; color:brown; } #Sub_Header { font-style:bold; font-size: 22pt; text-align:center; color:brown; } #List_Header { font-size:16pt; color:brown; border-bottom: solid 1 brown; } table { color:brown; border:solid thin brown; }
14
.fortable { border:solid thin brown; bordercolordark:brown; bordercolorlight:brown; width:300pt; }.forbutton { color:beige; background:brown; } Fall River Management 777 Elsbree Street Fall River, MA Personnel List First Name: Last Name: Department: This line establishes the link between what I will call Personnel_Data in my code and the actual data file which is called payroll.xml. For each table column where I want to put data from the XML file, I specify the connection to Personnel_Data and the name of the field on the XML data file.
15
Job: Salary: First <button class="forbutton" onClick="Personnel_Data.recordset.movePrevious(); if (Personnel_Data.recordset.BOF) Personnel_Data.recordset.moveFirst()"> Previous <button class="forbutton" onClick="Personnel_Data.recordset.moveNext(); if (Personnel_Data.recordset.EOF) Personnel_Data.recordset.moveLast()"> Next Last Note the if statement checking to see if moving back you go past the beginning of the file (BOF) and moving backward you go past the end of the file (EOF).
17
Fall River Management body { background:beige; } #Page_Header { font-style:bold; font-size: 26pt; text-align:center; color:brown; } #Sub_Header { font-style:bold; font-size: 22pt; text-align:center; color:brown; } #List_Header { font-size:16pt; color:brown; border-bottom: solid 1 brown; } table { color:brown; border:solid thin brown; }
18
th { border:solid thin beige; background: brown; color: beige; width:80pt; }.fortable { border:solid thin brown; bordercolordark:brown; bordercolorlight:brown; width:400pt; }.forcell { border:solid thin brown; text-align:center; width:80pt; }.forbutton { color:beige; background:brown; } Fall River Management 777 Elsbree Street Fall River, MA Personnel List
19
First Name Last Name Department Job Salary Note that I set up style for th in the style section - here is a copy: th { border:solid thin beige; background: brown; color: beige; width:80pt; } Each data field is listed in a separate cell on the same line. Binding the recordset to the table.
21
Fall River Management body { background:beige; } #Page_Header { font-style:bold; font-size: 26pt; text-align:center; color:brown; } #Sub_Header { font-style:bold; font-size: 22pt; text-align:center; color:brown; } #List_Header { font-size:16pt; color:brown; border-bottom: solid 1 brown; } table { color:brown; border:solid thin brown; }
22
th { border:solid thin beige; background: brown; color: beige; width:80pt; }.fortable { border:solid thin brown; bordercolordark:brown; bordercolorlight:brown; width:400pt; }.forcell { border:solid thin brown; text-align:center; width:80pt; }.forbutton { color:beige; background:brown; } Fall River Management 777 Elsbree Street Fall River, MA Personnel List
23
First Name Last Name Department Job Salary First <button class="forbutton" onClick="persTable.previousPage(); if (Personnel_Data.recordset.BOF) persTable.firstPage()"> Previous <button class="forbutton" onClick="persTable.nextPage(); if (Personnel_Data.recordset.EOF) persTable.lastPage()"> Next Last This gives the table an id name and establishes the datapagesize at 2. Navigating pages.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.