|Page (1) of 1 - 04/21/10||email article||print page|
Real World XML - Part 2 of 12Understanding XML usage today
XML is used in a number of different real-world settings today, but you can break down how XML is used into three main categories. Let's cover those now.
In the data extraction usage, you are taking XML and using it to represent some type of data format.
Now most modern databases can provide data in XML format today. All the large ones, like Oracle and Microsoft and MySQL, IBM for example. They can all export data using XML. The modern browsers can also load XML from different data sources. You can provide a URL or from the local file system. We'll be seeing an example of that later in this course.
There are also technologies like XPath and XQuery that are used for querying XML data in XML documents. XPath is a very lightweight form of querying and it takes a syntax that looks a little bit like Directory Paths that you might be familiar with. XQuery is a bit more complex. XQuery is to XML what SQL is to structured relational data. We are not going to cover that in this course because it's fairly advanced and could easily fill a title all on its own.
In the data preparation and processing area of usage, you take the XML data you have been given and prepare it for presentation and process it further. So for example, if you have an XML file that represents a series of products or items and these items might have prices, you might do some data preparation or processing to run through all the tags and add up all the prices to arrive at a total for example, or count the number of items in a file for some reason.
Technologies for doing this are XML Schema, which ensures that XML data in a document conforms to certain rules. So for example, a certain tag of a certain type has to be inside another tag of a certain type, or a tag that indicates a price has to contain only numbers and a period for the decimal place and so on. The XSLT technology, which stands for XML Stylesheet Language Transformations, is used to transform XML into other syntaxes like ASCII or PDF or HTML or more XML. DOM and SAX are two different programming methods used for scripting XML.
In this course, we'll use mostly the DOM because the browsers don't use SAX. For data presentation, you can use a combination of CSS, XSLT or DOM scripting in order to present data to the user. These are not mutually exclusive. You can use a combination of any of these three. During this course we'll do this a few times.
Click Play or press spacebar to start or stop video
Okay, let's take a look at the XML landscape as it's currently today.
In the data storage and exchange side, we have some established standards, like XHTML and RSS and SVG. We'll cover RSS a little bit later in this course. RSS is essentially a way of syndicating content that changes over time. You're probably familiar RSS by reading blogs, for example.
SVG stands for Scalable Vector Graphics. That's an XML syntax that describes drawings made using vectors, such as Illustrator files. There are a number of emerging standards however. ATOM, for example, is a standard publishing syndicated content just like RSS is. Only it's slightly richer.
Then there are standards like RDF and XForms, which we won't get into in this course, but solve their own types of business problems. XForms, for example, is a way of processing forms on the web. RDF stands Resource Description Framework.
Then there's XHTML 5, which is an emerging standard that aims to standardize the way that web applications are built. On the data processing side, there's DTD and Schema, which we have talked about earlier which enforces rules. There's DOM and SAX, which we also mentioned. Then there's technologies like XMLHTTP Request, which is the foundation of AJAX, and XSLT and XPath, which we have covered earlier.
We also talked a little bit about XML Query for querying XML data and then there's the XLink and XPointer specifications, which are also emerging. Again, we won't cover those in this course because they are fairly advanced, but the idea is that these provide more advanced ways of linking XML documents together far beyond what the standard HTML link gives us today.
Okay, so with this in mind, let's take a look at some important XML technologies.
www.lynda.com is an award-winning provider of educational materials, including Hands-On Training instructional books, the Online Training Library, CD- and DVD-based video training, and events for creative designers, instructors, students, and hobbyists.
The lynda.com Online Training Library and CD-ROM titles include such subjects as Photoshop, Flash, Dreamweaver, Illustrator, Office, digital photography, Web design, digital video, and many others. lynda.com's all-star team of trainers and teachers provides comprehensive and unbiased movie-based training to an international membership of tens of thousands of subscribers. Considering the speed at which technology evolves, the Online Training Library is a great solution for keeping your skills current. Library subscriptions begin as low as $25 a month, with no long-term commitment required.
Joe Marini is the director for Microsoft's Visual Studio Industry Partner program, and has been active in the Web and graphics industries for more than 15 years. He was an original member of the Dreamweaver engineering team at Macromedia, and has also held prominent roles in creating products such as QuarkXPress, mFactory's mTropolis, and Extensis QX-Tools. He is regularly a featured speaker at industry conferences and has authored or co-authored several books on Web development. His book The Document Object Model is widely regarded as the definitive resource for working with the DOM.
Related Keywords:xml, Extensible Mark-Up Language, xml training, xml tutorial, xml techniques, xml design, web design, web site design