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 
Size415.33 Kb
File typepdf
Downloads1673
Created2017-09-09
Cover of Python and the XML
Preview PDF

Download

  • Graph Algorithms

    Learn how graph algorithms can help you leverage relationships within your data to develop..., download free Algorithms tutorial in PDF (256 pages) created by Mark Needham ....

  • Building Back-End Web Apps with Java, JPA and JSF

    This book shows how to build back-end web applications with Java, JPA and JSF. A back-end web app is a distributed web app where essentially all work is performed by the back-end component, including data validation and UI page creation, while the front-end only consists of a web browser's renderi...

  • Introduction to Programming with Scratch

    This PDF tutorial will introduce you to programming using Scratch from MIT. Free document training course under 43 pages by Donald Bourret....

  • C++ Programming Language

    This PDF course explains the features, technical details and syntaxes of the C++ programming language. To be a proficient programmer, you need to master two things: the syntax of the programming language, and the core libraries (i.e., API) associated with the language....

  • The Coder's Apprentice

    The Coder's Apprentice is a course book, written by Pieter Spronck, that is aimed at teach..., download free Coding tutorial in PDF (398 pages) created by Pieter Spronck ....

  • Java 3D Programming

    Download free course Java 3D Programming, pdf file on 352 pages by Daniel Selman....

  • .NET Microservices

    Download free course .NET Microservices, pdf file on 350 pages by Cesar de la Torre, Bill Wagner, Mike Rousos....

  • A Byte of Python

    Download free course A Byte of Python, pdf file on 117 pages by Self-publishing....

  • Python 3 Tutorial for beginner

    Download Python PDF Tutorial for free, it consisting of 20 chapters and 74 pages covering all the most important Python concepts. This tutorial is intended for beginner programmers, and we recommend you to go through all the chapters, to get the most out of it as possible....

  • COBOL Programming

    Download COBOL tutorial in PDF,a free training courses under 236 pages to learn the basics of COBOL language...