Hello fine folks!
I have been working on a XML project this morning.
So if you were ever wondering what hard spent educational money buys,
here is an excercise:
***also, I have updated this 3 times since 1st post since I have discoved incorrect syntax***
always keep checking!!!!
Teacher: "Go to http://www.w3schools.com/ and read the tutorial on XML.
Then write (2) examples"
That's it!
I do have to say that the w3schools has helped me tremendously in the past with HTML and CSS,
so use it and embrace its resource.
Also, a good rule I have to pass along as well from another teacher referring to open/close tags:
"Tags are like butt cheeks. You need two of them or things get messy!"
Remember XML doesn't do anything, its just a way of describing your code
In XML pay close attention to elements and tag order,
you need to set up a sort of hierarchy.
Here is what I came up with,
this goes along with a custom database I am creating:
<?xml version="1.0" encoding="ISO-8859-1"?>
<pet_database>
<pets>
<pet_id1000>
<name>patches</name>
<type>dog</type>
<breed>german_shepherd</breed>
<dob>2010-02-28</dob>
<owner_id>15236</owner_id>
</pet_id1000>
<pet_id1001>
<name>killer</name>
<type>dog</type>
<breed>rottweiler</breed>
<dob>2010-01-15</dob>
<owner_id>20012</owner_id>
</pet_id1001>
<pet_id1002>
<name>fluffy</name>
<type>dog</type>
<breed>cocker_spaniel</breed>
<dob>2008-06-17</dob>
<owner_id>45637</owner_id>
</pet_id1002>
<pet_id1003>
<name>Walter</name>
<type>dog</type>
<breed>husky</breed>
<dob>2009-03-14</dob>
<owner_id>23456</owner_id>
</pet_id1003>
<pet_id1004>
<name>missy</name>
<type>dog</type>
<breed>st_bernard</breed>
<dob>2010-11-11</dob>
<owner_id>00045</owner_id>
</pet_id1004>
<pet_id1005>
<name>cujo</name>
<type>dog</type>
<breed>chihuahua</breed>
<dob>2007-01-31</dob>
<owner_id>02025</owner_id>
</pet_id1005>
</pets>
</pet_database>
Good times!
-A
I have started this as more or less a standing documentation of my studies in: -Computer Programming -Web Development and Design -Mathematics -Fitness and Nutrition -Music -Life
lynda.blog
Followers
Blog Archive
Andrew's Info
- Andrew Garbe
- Louisville, KY, United States
- Working on finishing up my Software Development Technology Degree in Fall 2012. Looking forward to the next chapter of studies and personal growth! I have been recently married and have 2 awesome dogs. Below is some random thoughts, knowledge, and examples of things I think might prove helpful to someone hopefully!
Please see http://w3fools.com/
ReplyDelete