Python and the XML

Parser of HTML and XML with python and library Python Programming Course Tutorial Computing Learning.

There are several libraries for manipulating XML documents with Python, but this chapter is limited to a part of the standard xml package. This package provides several sub-packages:

  • Dom contains minidom, an implementation of DOM in Python,
  • Sax is an available implementation dictionary,
  • Parsers contains the parsers used internally by DOM and SAX.

In addition, several libraries and extensions are available. They provide, for example, higher level abstractions and typed tools for a given use.

Table of Contents

  • Introduction 
  • When not to use the DOM 
  • URL and URN 
  • Absolute URI 
  • Local name 
  • Reading an XML document in Python 
  • A quick and dirty document reader 
  • A full-featured reader 
  • The structure of a DOM tree 
  • The Node class 
  • NodehasChildNodes() 
  • NodeinsertBefore() 
  • NodeisSameNode() 
  • NoderemoveChild() 
  • NodereplaceChild() 
  • Nodexpath() 
  • The Document class 
  • The Element class 
  • ElementhasAttributeNS() 
  • ElementremoveAttributeNS() 
  • ElementsetAttributeNS() 
  • ElementsetAttributeNodeNS() 
  • The Attr class 
  • New Mexico Tech Computer Center Python-XML DOM 
  • The CharacterData classes: Text, CDATA, and Comment 
  • CharacterDatareplaceData() 
  • CharacterDatasubstringData() 
  • The DOMImplementation object 
  • DOMImplementationcreateDocument() 
  • DOMImplementationcreateRootNode() 
  • Printing a document 
  • Creating a document from scratch: factory methods 
  • DocumentcreateElementNS() 
  • DocumentcreateTextNode() 
  • xmlcreatepy: A more Pythonic module for XML file creation 
  • The DocumentType class 
  • The Document class 
  • The Element class 
  • The Text class 
  • xmlcreatepy: The source code 
  • Prologue to xmlcreatepy 
  • The DocumentType class 
  • The Document class 
  • DocumentsplitQName(): Process a qualified name 
  • Documentserialize() 
  • Documentwrite() 
  • The Element class 
  • Element__newElement(): Element child of an element 
  • Element__setitem__() 
  • Elementupdate(): Copy XML attributes to the element 
  • The DocumentFragment class 
  • DocumentFragmentserialize() 
  • DocumentFragmentwrite() 
  • Test driver for multiple namespaces: crens 
  • Test driver for a document fragment: crefrag 
Size : 415.33 Kb
File type : pdf
Downloads: 1636
Created: 2017-09-09

Others DOM Tutorials

Getting started with DOM

Understanding the DOM

Document Object Model Tutorial

Understanding the DOM

Tutorial XML and DOM in PDF

Others related eBooks about Python and the XML

Android Application Development for the Intel Platform

Download free course Android Application Development for the Intel Platform, pdf file on 508 pages by by Ryan Cohen, Tao Wang....

Java, Java, Java

Download free course Java, Java, Java, pdf file on 856 pages by Ralph Morelli, Ralph Walde....

Learning Laravel by examples

With this PDF tutorial you will learn how to build a web application with Laravel PHP Framework version 4, free training document under 58 pages....

Rexx Programmer's Reference

Download free course Rexx Programmer's Reference, pdf file on 723 pages by Howard Fosdick....

Cryptography in .NET Succinctly

Download free course Cryptography in .NET Succinctly, pdf file on 67 pages by Dirk Strauss....

Problem Solving with Algorithms and Data Structures

Download free tutorial in Algorithms and data structures created by Brad Miller and David ranum....

Learning C#

Download free course Learning C#, pdf file on 1008 pages by Stack Overflow Community....

Arduino Development Cookbook

The single-chip computer board Arduino is small in size but vast in scope, capable of bein..., download free Arduino tutorial in PDF (246 pages) created by Cornel Amariei ....

The Vue.js Handbook

Download free course The Vue.js Handbook, pdf file on 122 pages by Flavio Copes....

How To Code in Python 3

Extremely versatile and popular among developers, Python is a good general-purpose languag..., download free Python tutorial in PDF (458 pages) created by ....