petros kavassalis
DESCRIPTION
Enterprise IT [Πληροφοριακές Τεχνολογίες της Επιχείρησης] Lecture 4 & 5: XML Overview Univ. of the Aegean Financial and Management Engineering Dpt. Petros KAVASSALIS. What you will learn in this course. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Petros KAVASSALIS](https://reader030.vdocuments.mx/reader030/viewer/2022020323/5681692e550346895de0734a/html5/thumbnails/1.jpg)
1
Enterprise IT[Πληροφοριακές Τεχνολογίες της Επιχείρησης]
Lecture 4 & 5: XML Overview
Univ. of the Aegean Financial and Management Engineering Dpt
Petros KAVASSALIS<[email protected]>
![Page 2: Petros KAVASSALIS](https://reader030.vdocuments.mx/reader030/viewer/2022020323/5681692e550346895de0734a/html5/thumbnails/2.jpg)
What you will learn in this course
A set of fundamental concepts for understanding basic Enterprise Information Technologies Enterprise Software Applications Enterprise Architecture Integration (EAI)
Best practices and techniques for building and migrating to a service-oriented enterprise
Strategies for integrating applications using standard technologies XML Web Services
Familiarization with concepts such as: Interoperability e-business e-government 2.0
![Page 4: Petros KAVASSALIS](https://reader030.vdocuments.mx/reader030/viewer/2022020323/5681692e550346895de0734a/html5/thumbnails/4.jpg)
Students evaluation
Class Participation (20%)
+ Assignments (20%)
+ Final Exam (650%)
![Page 5: Petros KAVASSALIS](https://reader030.vdocuments.mx/reader030/viewer/2022020323/5681692e550346895de0734a/html5/thumbnails/5.jpg)
First go to http://www.w3schools.com/xml/default.asp
![Page 6: Petros KAVASSALIS](https://reader030.vdocuments.mx/reader030/viewer/2022020323/5681692e550346895de0734a/html5/thumbnails/6.jpg)
XML in a nutshell
XML: Extensible Markup Language XML Working Group at W3C (please visit!)
Used for the definition of methods of storing, processing and managing information (texts) in electronic form Device independent System independent
Used to represent business transactions within and outside the enterprise and mediate communication between systems that support transactions Example: purchase orders, invoices, shipping, bills of lading, warehousing
information delivery etc Used to standardize the process by which enterprise applications
exchange message in the context of a transaction (within the enterprise or between trading partners)
![Page 7: Petros KAVASSALIS](https://reader030.vdocuments.mx/reader030/viewer/2022020323/5681692e550346895de0734a/html5/thumbnails/7.jpg)
Markup etc.
Markup Describe annotations or special marks (codes) inserted into electronic texts to govern
text formatting, processing, printing etc. Make explicit the representation of text
Markup language A set of conventions put together for encoding texts
o What markup?o What is required?o What does it mean?o How can it be distinguished from text?
Meta-language Provides a way of formally describing a language, i.e. a markup language XML: no predetermined tags XML: Descriptive markup (the mark-up annotations simply categorize parts of the
document)
![Page 8: Petros KAVASSALIS](https://reader030.vdocuments.mx/reader030/viewer/2022020323/5681692e550346895de0734a/html5/thumbnails/8.jpg)
Re-usability
A language for creating other languages! One uses XML to design his (her) own custom markup language (XMP
application) The, he(she) uses this custom language to format documents
A tag identifies (characterizes) data, data in that way become available for other tasks Labeled information that can be re-used
Sister technology: XML Schemas Defines the custom markup language one creates with XML
o Specifies tags to use in a documento Tags and attributes these tags can contain
![Page 10: Petros KAVASSALIS](https://reader030.vdocuments.mx/reader030/viewer/2022020323/5681692e550346895de0734a/html5/thumbnails/10.jpg)
XML: Elements, Attributes and Values
http://www.w3schools.com/xml/default.asp <?xml version="1.0"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> http://www.w3schools.com/xml/xml_tree.asp
<[email protected]> 10
![Page 11: Petros KAVASSALIS](https://reader030.vdocuments.mx/reader030/viewer/2022020323/5681692e550346895de0734a/html5/thumbnails/11.jpg)
Note: [Reference for the following examples]
http://elizabethcastro.com/xml/examples/index.html#ch1
<[email protected]> 11
![Page 12: Petros KAVASSALIS](https://reader030.vdocuments.mx/reader030/viewer/2022020323/5681692e550346895de0734a/html5/thumbnails/12.jpg)
XML: Declaring the version, root element and other rules
<?xml version="1.0" ?> <endangered_species />
Closing tags are required Case matters Values must enclosed in quotations
<[email protected]> 12
![Page 13: Petros KAVASSALIS](https://reader030.vdocuments.mx/reader030/viewer/2022020323/5681692e550346895de0734a/html5/thumbnails/13.jpg)
XML: Nesting elements <inner>
<?xml version="1.0" ?> <endangered_species>
<animal><name>Tiger</name><threat>poachers</threat><weight>500 pounds</weight>
</animal> </endangered_species> Important: The elements in an XML document form a document tree. The tree starts at the
root and branches to the lowest level of the tree. An element nested with another is referred to as “child element” (or, inversely, “parent element”)
<root> <child> <subchild>.....</subchild> </child></root>
<[email protected]> 13
animal: 3 child elements
![Page 14: Petros KAVASSALIS](https://reader030.vdocuments.mx/reader030/viewer/2022020323/5681692e550346895de0734a/html5/thumbnails/14.jpg)
XML: Attributes
<?xml version="1.0" ?> <endangered_species>
<animal> <name language="English">Tiger</name> <name language="Latin">panthera tigris</name> <threat>poachers</threat> <weight>500 pounds</weight> </animal> </endangered_species>
<[email protected]> 14
![Page 15: Petros KAVASSALIS](https://reader030.vdocuments.mx/reader030/viewer/2022020323/5681692e550346895de0734a/html5/thumbnails/15.jpg)
XML: Empty Elements
<?xml version="1.0" ?> <endangered_species>
<animal> <name language="English">Tiger</name> <name language="Latin">panthera tigris</name> <threat>poachers</threat> <weight>500 pounds</weight> <source sectionid="120" newspaperid="21" /> <picture filename="tiger.jpg" x="200" y="197" /> </animal> </endangered_species>
<[email protected]> 15
![Page 16: Petros KAVASSALIS](https://reader030.vdocuments.mx/reader030/viewer/2022020323/5681692e550346895de0734a/html5/thumbnails/16.jpg)
XML: Writing comments
<?xml version="1.0" ?> <endangered_species>
<animal> <name language="English">Tiger</name> <name language="Latin">panthera tigris</name> <threat>poachers</threat> <weight>500 pounds</weight>
<!-- the source tag references the corresponding article on the World Wildlife Fund web site -->
<source sectionid="120" newspaperid="21" /> <picture filename="tiger.jpg" x="200" y="197" /> </animal></endangered_species>
<[email protected]> 16
![Page 17: Petros KAVASSALIS](https://reader030.vdocuments.mx/reader030/viewer/2022020323/5681692e550346895de0734a/html5/thumbnails/17.jpg)
XML: Special Symbols(&, <, >, ", &apos)
<?xml version="1.0" ?> <endangered_species>
<animal> <name language="English">Tiger</name> <name language="Latin">panthera tigris</name> <threat>poachers</threat> <weight><500 pounds</weight>
<!-- the source tag references the corresponding article on the World Wildlife Fund web site -->
<source sectionid="120" newspaperid="21" /> <picture filename="tiger.jpg" x="200" y="197" /> </animal> </endangered_species>
<[email protected]> 17
![Page 18: Petros KAVASSALIS](https://reader030.vdocuments.mx/reader030/viewer/2022020323/5681692e550346895de0734a/html5/thumbnails/18.jpg)
XML: Displaying elements as text
<?xml version="1.0" ?> <xml_book>
<tags><appearance><![CDATA[ <endangered_species> <animal> <name language="English">Tiger</name> <name language="Latin">panthera tigris</name> <threat>poachers</threat> <weight>500 pounds</weight> <!--the source tag references the corresponding article on the World Wildlife Fund web site--> <source sectionid="120" newspaperid="21"></source> <picture filename="tiger.jpg" x="200" y="197"/> </animal> </endangered_species> ]]> </appearance></tags>
</xml_book>
<[email protected]> 18
![Page 19: Petros KAVASSALIS](https://reader030.vdocuments.mx/reader030/viewer/2022020323/5681692e550346895de0734a/html5/thumbnails/19.jpg)
Check point: Understand an XML document
<[email protected]> 19
Please visit: Debugging an XML document http://faculty.matcmadison.edu/schmidt/xml/exer1.html
![Page 21: Petros KAVASSALIS](https://reader030.vdocuments.mx/reader030/viewer/2022020323/5681692e550346895de0734a/html5/thumbnails/21.jpg)
Check point: Create an XML Document[Reference: Allen Schmidt Class Support Home Page]
Items = {Item} <--This means that there are multiple Item entries within Items Item contains Item Number Description Selling Price Cost Quantity On Hand Date Last Received Quantity Sold; Year-To-Date (current) / *modification Warehouse Section Warehouse Shelve {Supplier} <-- This means that there are several suppliers for each item
Instructions First structure the information Then, create the document At the end, validate it!
<[email protected]> 21