|Author:||Dr. Lawrence Nader|
|Published:||5 May 2015|
|PDF File Size:||39.87 Mb|
|ePub File Size:||48.82 Mb|
|Uploader:||Dr. Lawrence Nader|
XML Tutorial - An Introduction to XML
Unfortunately, if that document also had to be posted to the Web as an HTML document, someone would have to convert it either manually or via softwareclean it up, and test it.
If yet another person wanted to take the same information and use it in a slide presentation, they might run the risk xml tutorial pdf c using outdated information from the HTML version.
As you can see, it can get pretty messy! If you made changes to the XML file, the other files would also change automatically once you passed the XML file through the process.
This notion, by the way, is an essential component of single-sourcing — i. As you can see, separating information from presentation makes your XML documents reusable, and can save hassles and headaches in environments in which a lot of information needs to be stored, processed, handled, and exchanged.
That means the publisher can generate sample PDFs for its Website, make print-ready files for the printer, and potentially create ebooks in the future. All formats will be generated from the same source, and all will be created using xml tutorial pdf c style sheets to process the base XML files.
One of the most powerful advantages of XML, of course, is that it allows you to define your own language. However, this most powerful feature also exposes a great weakness of XML.
CSS for XML tutorial
If all of us start defining our own languages, we run the risk of being unable to understand anything anyone else says. An XML document must contain a single root element that contains all other elements.
All elements must be properly nested. All attribute values must be quoted. A valid document, then, is nothing more then a well-formed document that adheres to its DTD.
The question then becomes, why have two levels of legality?
A good question, indeed! For the most part, you will only care that your documents are well formed. Well-formedness alone allows you to create ad hoc XML documents that can be generated, added to an application, and tested quickly.
Well-formedness is mandatory, but validity is an extra, optional step. The first thing we want to do is to create an XML document. Here it is again, with a few more nodes added to it: It really is as good as we say it is--or your money back.
xml tutorial pdf c
Notice the little minus signs next to some of the XML nodes? A minus sign in xml tutorial pdf c of a node indicates that the node contains other nodes. If you click the minus sign, Internet Explorer will collapse all the child nodes belonging to that node, as shown in Figure 1.