Python and XML

Front Cover
"O'Reilly Media, Inc.", 2002 - Computers - 360 pages

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.

 

What people are saying - Write a review

We haven't found any reviews in the usual places.

Selected pages

Contents

Python and XML
1
Key Advantages of XML
2
The XML Specifications
7
The Power of Python and XML
9
What Can We Do with It?
16
XML Fundamentals
18
Document Types and Schemas
19
Types of Conformance
22
Using XSLT from the Command Line
132
XSLT Elements
133
A More Complex Example
139
Embedding XSLT Transformations in Python
142
Choosing a Technique
149
XML Validation and Dialects
150
Validation at Runtime
154
The BillSummary Example
156

Physical Structures
23
Constructing XML Documents
24
Document Type Definitions
34
Canonical XML
41
Going Beyond the XML Specification
43
The Simple API for XML
46
Understanding SAX
47
Reading an Article
52
Searching File Information
56
Building an Image Index
65
Converting XML to HTML
69
Advanced Parser Factory Usage
76
Native Parser Interfaces
77
The Document Object Model
80
Understanding the DOM
83
Python DOM Offerings
85
Retrieving Information
86
Changing Documents
92
Building a Web Application
97
Going Beyond SAX and DOM
110
Querying XML with XPath
111
Where Is XPath Used?
112
XPath Arithmetic Operators
118
XPath Functions
119
Compiling XPath Expressions
123
Transforming XML with XSLT
125
XSLT Processors
126
Defining Stylesheets
127
Dialects Frameworks and Workflow
177
Python Internet APIs
180
Working with URLs
181
Opening URLs
184
Connecting with HTTP
186
Using the Server Classes
194
Python Web Services and SOAP
204
Python Web Services Support
205
Python SOAP Options
213
Example SOAP Server and Client
217
What About XMLRPC?
224
Python and Distributed Systems Design
226
Understanding the Scope
228
Building the Database
229
Building the Profiles Access Class
231
Creating an XML Data Store
245
The XML Switch
253
Running the XML Switch
274
A Web Application
275
Installing Python and XML Tools
289
XML Definitions
293
Python SAX API
302
Python DOM API
311
Working with MSXML30
323
Additional Python XML Tools
338
Index
343
Copyright

Other editions - View all

Common terms and phrases