Synopses & Reviews
If you are a Python programmer who wants to incorporate XML into your skill set, this is the book for you. Python has attracted a wide variety of developers, who use it either as glue to connect critical programming tasks together, or as a complete cross-platform application development language. Yet, because it is object-oriented and has powerful text manipulation abilities, Python is an ideal language for manipulating XML.
Python & XML gives you a solid foundation for using these two languages together. Loaded with practical examples, this new volume highlights common application tasks, so that you can learn by doing. The book starts with the basics then quickly progresses to complex topics, like transforming XML with XSLT, querying XML with XPath, and working with XML dialects and validation. It also explores the more advanced issues: using Python with SOAP and distributed web services, and using Python to create scalable streams between distributed applications (like databases and web servers).
The book provides effective practical applications, while referencing many of the tools involved in XML processing and Python, and highlights cross-platform issues along with tasks relevant to enterprise computing. You will find ample coverage of XML flow analysis and details on ways in which you can transport XML through your network.
Whether you are using Python as an application language, or as an administrative or middleware scripting language, you are sure to benefit from this book. If you want to use Python to manipulate XML, this is your guide.
Synopsis
As an object-oriented language with powerful text processingcapabilities, Python is an ideal language for manipulating XML. "Python & XML provides you with a solid foundation forusing these two languages together. Loaded with practical examples, the book highlights common application tasks, so that you canlearn by doing. The book starts with the basics then quickly progresses tocomplex topics, like transforming XML with XSLT, querying XMLwith XPath, and working with XML dialects and validation. It alsocovers the more advanced issues, such as SOAP and distributed webservices, and explores the use of Python to create scalable XMLstreams between distributed applications. If you are a Python programmer who wants to incorporateXML into your skill set, this is the book for you.
Synopsis
This book has two objectives--to provide a comprehensive reference on using XML with Python; and to illustrate the practical applications of these technologies in an enterprise environment with examples.
Table of Contents
Dedication; Preface; Audience; Organization; Conventions Used in This Book; Using Code Examples; How to Contact Us; Acknowledgments; Chapter 1: Python and XML; 1.1 Key Advantages of XML; 1.2 The XML Specifications; 1.3 The Power of Python and XML; 1.4 What Can We Do with It?; Chapter 2: XML Fundamentals; 2.1 XML Structure in a Nutshell; 2.2 Document Types and Schemas; 2.3 Types of Conformance; 2.4 Physical Structures; 2.5 Constructing XML Documents; 2.6 Document Type Definitions; 2.7 Canonical XML; 2.8 Going Beyond the XML Specification; Chapter 3: The Simple API for XML; 3.1 The Birth of SAX; 3.2 Understanding SAX; 3.3 Reading an Article; 3.4 Searching File Information; 3.5 Building an Image Index; 3.6 Converting XML to HTML; 3.7 Advanced Parser Factory Usage; 3.8 Native Parser Interfaces; Chapter 4: The Document Object Model; 4.1 The DOM Specifications; 4.2 Understanding the DOM; 4.3 Python DOM Offerings; 4.4 Retrieving Information; 4.5 Changing Documents; 4.6 Building a Web Application; 4.7 Going Beyond SAX and DOM; Chapter 5: Querying XML with XPath; 5.1 XPath at a Glance; 5.2 Where Is XPath Used?; 5.3 Location Paths; 5.4 XPath Arithmetic Operators; 5.5 XPath Functions; 5.6 Compiling XPath Expressions; Chapter 6: Transforming XML with XSLT; 6.1 The XSLT Specification; 6.2 XSLT Processors; 6.3 Defining Stylesheets; 6.4 Using XSLT from the Command Line; 6.5 XSLT Elements; 6.6 A More Complex Example; 6.7 Embedding XSLT Transformations in Python; 6.8 Choosing a Technique; Chapter 7: XML Validation and Dialects; 7.1 Working with DTDs; 7.2 Validation at Runtime; 7.3 The BillSummary Example; 7.4 Dialects, Frameworks, and Workflow; 7.5 What Does ebXML Offer?; Chapter 8: Python Internet APIs; 8.1 Connecting Web Sites; 8.2 Working with URLs; 8.3 Opening URLs; 8.4 Connecting with HTTP; 8.5 Using the Server Classes; Chapter 9: Python, Web Services, and SOAP; 9.1 Python Web Services Support; 9.2 The Emerging SOAP Standard; 9.3 Python SOAP Options; 9.4 Example SOAP Server and Client; 9.5 What About XML-RPC?; Chapter 10: Python and Distributed Systems Design; 10.1 Sample Application and Flow Analysis; 10.2 Understanding the Scope; 10.3 Building the Database; 10.4 Building the Profiles Access Class; 10.5 Creating an XML Data Store; 10.6 The XML Switch; 10.7 Running the XML Switch; 10.8 A Web Application; Installing Python and XML Tools; Installing Python; Installing PyXML; Installing 4Suite; XML Definitions; XML Definitions; Python SAX API; Python DOM API; DOMException; DOMImplementation; DocumentFragment; Document; Node; NodeList; NamedNodeMap; CharacterData; Attr; Element; Text; Comment; CDATASection; DocumentType; Notation; Entity; EntityReference; ProcessingInstruction; 4DOM Extensions; Working with MSXML3.0; Setting Up MSXML3.0; Basic DOM Operations; MSXML3.0 Support for XSLT; Handling Parsing Errors; MSXML3.0 Reference; Additional Python XML Tools; Pyxie; Python XML Tools; XML Schema Validator; Sab-pyth; Redfoot; XML Components for Zope; Online Resources; Colophon;