intro to xml dr. lam tecm5191. why xml? text chrislam138 to 22333

8
Intro to XML Dr. Lam TECM5191

Upload: joshua-robbins

Post on 02-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Intro to XML Dr. Lam TECM5191. Why XML? Text CHRISLAM138 to 22333

Intro to XMLDr. Lam

TECM5191

Page 2: Intro to XML Dr. Lam TECM5191. Why XML? Text CHRISLAM138 to 22333

Why XML?

• Text CHRISLAM138 to 22333

Page 3: Intro to XML Dr. Lam TECM5191. Why XML? Text CHRISLAM138 to 22333

So, why XML?

1. Useful for sharing data between formats

2. Requires structure and hierarchy while still being extremely flexible

3. Inherently semantic and intended for humans AND machines

4. Extremely simple (just text describing text). That’s it.

Page 4: Intro to XML Dr. Lam TECM5191. Why XML? Text CHRISLAM138 to 22333

XML is: Useful for sharing data between formats

• XML can be transformed using languages like XSLT or XFOP to output data in a variety of formats.• Essentially what makes the single source for

single sourcing

• XML has both an input and output path• Data can be put into XML (e.g., from MySQL

database into XML document)• Data can be parsed from XML (e.g., XML

document into XLS or CSV file)

Page 5: Intro to XML Dr. Lam TECM5191. Why XML? Text CHRISLAM138 to 22333

XML Requires structure and hierarchy while still being

extremely flexible

<address><street_number>123</street_number>

<street_name>Fake</street_name>

<street_type>Street</street_type>

<city>Denton</city>

<state>Texas</state>

<zip>76201</zip>

</address>

Page 6: Intro to XML Dr. Lam TECM5191. Why XML? Text CHRISLAM138 to 22333

XML is Inherently semantic and intended for humans AND machines

<address><street_number>123</street_number>

<street_name>Fake</street_name>

<street_type>Street</street_type>

<city>Denton</city>

<state>Texas</state>

<zip>76201</zip>

</address>

Page 7: Intro to XML Dr. Lam TECM5191. Why XML? Text CHRISLAM138 to 22333

XML Rules

1. All tags that open must close

2. Tags are case sensitive (always use lowercase!)

3. Tags close in the reverse order they open

4. Documents must have a root element

5. Values must be quoted

Page 8: Intro to XML Dr. Lam TECM5191. Why XML? Text CHRISLAM138 to 22333

Let’s Practice

Mark it up! Choose two faculty members to create an XML schema.

Push to Git.

http://tc.unt.edu/faculty