PREFACE

When I first learnt about XML, I was amazed by the buzz generated by this technology, as well, by the hype surrounding it. Every possible programming language, platform, and job advertisement seemed to speak about it. And yet when I thought of learning about it, I actually did not know what to learn. Because there were books and articles that promised to teach me XML and I ended up learning how to use XML. For example, with some attempt, I managed to grasp, how to create simple XML documents, how to validate their contents using DTDs and later on using schemas. I could also write programs in Java (and in those days, C++) that could parse the contents of an XML document, to look for a particular element, retrieve all instances of a particular element, and so on.

Soon, I also started mastering clumsy technology called as XSLT. However, all along I could not still understand why I was doing it, other than knowing that everyone seemed to be using it in the same clueless manner!

When I was working with L&T Infotech (LTITL, then), I had been to Germany for a two-week requirements study for one of our customers in 2000 and I remember us, suggesting the usage of XML to the customer for reasons that none of us (or the customer) knew! It was a clear indication of the hype surrounding XML overcoming my thought process. I also recollect how proud I was to be able to read a text file provided by the customer in its proprietary format and transform it into XML. What's more, – we also worked on improving the performance of that application by way of various advanced C++ data structures, and so on. However, the basic question of why we were doing all this was still a mystery! Even though I laugh about it now, but after that, for a very brief while, I worked on a project where we were supposed to build an XML editor (for what, God knows!).

That is when I started a study of why we need XML in the first place, instead of worrying about how to use it. Thankfully, around the same time, I also started working on a large financial project, where we were constantly struggling to come to terms with various data formats generated by various applications. The challenge was to integrate all of them in a universal manner. That is when it all started falling into place. I started to understand why XML was required. A Pandora's box had opened! I was now appreciating what I had learnt about XML. Later, I also got some exposure to EDI and I began to realize the value of XML.

Around the same time, I had started teaching in various colleges. One of the first courses I taught was on XML technology and some eyebrows were raised about it. Questions like, why one needed a course on XML, what could one possibly cover in XML? etc. were raised. However, I was adamant, since I was able to see the value of making the future IT professionals aware of the XML world. This way, I would be able to dispel the myths and hype surrounding XML. Interestingly, even now, some people ask me about the need for a book on XML. But, I think now we have reached a stage where the success and importance of XML is up there, and for everyone to see. With the new jargon such as EAI, Web Services, SOA, and EDA making everyone crazy, XML has almost reached a state of indispensability for several years to come. Without XML, things would just not move anymore!

This book is my attempt to simplify and demystify the XML technology, both based on my working experience as an IT professional and as a teacher of this course for over 5 years now. I have learnt more and more about this fascinating technology. However, at the same time, I have also constantly warned everyone regarding the unnecessary hype that XML seems to be generating. Why should I write another book when a few exist in the market already? Well, the reasons are plenty:

  • Very few books, if any at all, tell us why XML is needed.
  • Most books seem to be concentrating on the how part of XML, which is not the first thing we want to know.
  • A lot of unnecessary material is cramped into several books.
  • The examples that are used, are many a time too complex, or are irrelevant from a practical point of view.
  • No book explains XML DTD, schema, XML with Java, XML with .NET, and XML with Ajax and Web Services in a single tome.
  • Finally, most books lack good working examples.

Like all my other books, I can describe this book in a single line: If I am learning this subject for the first time, this is the single book I need to get hold of, to understand the subject completely. I asked myself if I could say that about this book by assuming that I was a student, a professor, or an IT professional/manager/CIO. The answer was in the affirmative. That is why this book is in your hands now. I would be eager to know if you are in agreement with me after reading this book.

One of the things I hate the most is throwing around a lot of meaningless jargon. I have tried my best to keep this book simple and jargon-free and to explain things as far as possible. I believe that it is fine to oversimplify at times, rather than to show your smartness by using words that no one understands, including you, yourself! To what extent I have succeeded in this attempt is something that I would leave to you to judge.

I strongly agree with the proverb A picture is worth a thousand words. That is why I have made a liberal use of diagrams, illustrations, case studies, working examples, and exercises.

Book organization and sequence

The book is organized as follows:

Chapter 1 introduces the why aspects of XML. It explains the origins of EDI, where it fails, and how XML takes over. It also covers all the important XML technologies in brief by providing a crisp overview of them.

Chapter 2 talks about the how aspects of XML. For example, it clarifies concepts surrounding the XML grammar, formats, conventions, basic syntaxes, and also explains the idea of XML namespaces.

Chapter 3 takes a very detailed tour of Document Type Definitions (DTD). DTDs are used to validate the contents of XML documents. Although they are getting replaced by schemas now, DTDs are still widely used in applications of the recent past. Hence, it is important to know the various syntaxes of DTD and how best to apply them in given situations.

Chapter 4 takes over from where Chapter 3 ends. It explains the interesting technology of XML schemas in depth. Several examples, illustrate the usage of various syntactical elements of XML schema, and how best to use them. Schemas are very critical in today's world.

Chapter 5 talks about the Cascading Styles Sheet (CSS) technology, which is not directly linked to XML as such, but is invariably required for presentation of XML content.

Chapter 6 takes a whirlwind tour of the XML Stylesheet Language (XSL) – perhaps the trickiest aspect of XML. All crucial XSL intricacies are explained. Many working examples show the working of XSL from various angles.

Chapter 7 has a detailed coverage of the usage of XML with reference to the Java world. All the concepts surrounding XML parsing, using Java with all the latest trends have been covered. Many examples also help understand the theory.

Chapter 8 completes the picture by explaining the usage of XML with reference to the .NET world. Again, examples cover all the essential concepts by way of the practical side of things.

Chapter 9 deals with two modern XML-based technologies: Web Services, and Ajax. These are here to stay for a while and we must know what they are, how they function, and how XML is related to them.

Chapter 10 completes the picture by talking about security of XML with reference to the standards that have come up recently.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.173.112