Skip to content

Commit

Permalink
Merge branch 'master' of github.com:clauspruefer/python-xml-microparser
Browse files Browse the repository at this point in the history
  • Loading branch information
clauspruefer committed Nov 10, 2024
2 parents 8df9f1d + d973dfd commit 3139148
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 21 deletions.
50 changes: 47 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,47 @@
# python-xml-microparser

A lightweight XML Parser written in Python for basic XML parsing and manipulation of XML documents.
# Python XML-Microparser Module

The **python-xml-microparser** module is a small OOP based XML Parser without DTD and SAX functionality.

## 1. Documentation

Documentation including examples can be found at either [./doc](./doc) or [https://pythondocs.webcodex.de/xml-microparser/](https://pythondocs.webcodex.de/xml-microparser/).

## 2. Installation

Most Linux Distributions come with already Python3 met dependencies (see **2.1**). Just download the Relase Tarball [link](link) and continue with section **2.2**.

## 2.1. Dependencies

You need the `pip3` Python3 Package Installer, Python3 Setuptools `python3-setuptools` and the downloaded XML-Microparser
Package found under Releases.

```bash
# apt-get install python3-setuptools python3-pip
```

>[!IMPORTANT]
> The following section describes how to install the XML-Microparser package globally. Newer PIP Package Manager Versions forbid this.
> It is possible to override by providing the `--break-system-packages` flag.
## 2.2. Non-Restrictive PIP Install

Do this for a pip system where `--break-system-packages` is not needed.

```bash
# sudo pip3 install dist/xmlmicroparser-0.50b0.tar.gz
```

## 2.3. Restrictive PIP Install

Do this for a pip system where `--break-system-packages` is needed.

```bash
# sudo pip3 install dist/xmlmicroparser-0.50b0.tar.gz --break-system-packages
```

## 3. Boost Python

Using the XML-Microparser Module with Boost Python C++ https://www.boost.org/doc/libs/1_86_0/libs/python/doc/html/index.html
makes XML configuration handling in C++ projects easy.

See @ https://github.com/WEBcodeX1/http-1.2/.
16 changes: 9 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,26 @@

setup(

name = 'python-xml-microparser',
version = '0.53beta',
name = 'xmlmicroparser',
version = '0.54beta',
author = 'Claus Prüfer',
author_email = '[email protected]',
maintainer = 'Claus Prüfer',
description = 'A tiny, plain xml parser without XSLT/DTD capability.',
url = 'http://python-xml-microparser.docs.webcodex.de',
description = 'A tiny xml parser without DTD/XSLT/SAX functionality.',
license = 'GPLv3',
long_description = open('./README.rst').read(),
long_description = open('./README.md').read(),

packages = [
'xml_microparser'
'xmlmicroparser'
],

package_dir = {
'xml_microparser': 'src/'
'xmlmicroparser': 'src/'
},

install_requires = [
],

zip_safe = True

)
4 changes: 1 addition & 3 deletions src/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
# . XML Microparser Python Module .
# ]*[ --------------------------------------------------------------------- ]*[
# . .
# . Copyright Claus Prüfer 2016-2019 .
# . Copyright Claus Prüfer 2016-2024 .
# . .
# . XML Parser Helper classes .
# . .
# ]*[ --------------------------------------------------------------------- ]*[

# -*- coding:utf-8 -*-

import logging


Expand Down
8 changes: 3 additions & 5 deletions src/microparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@
# . XML Microparser Python Module .
# ]*[ --------------------------------------------------------------------- ]*[
# . .
# . Copyright Claus Prüfer 2016-2019 .
# . Copyright Claus Prüfer 2016-2024 .
# . .
# . Lightweight XML Parser and JSON Transformer Module .
# . .
# ]*[ --------------------------------------------------------------------- ]*[

# -*- coding:utf-8 -*-

import re
import json
import logging

from xml_microparser.transformer import JSONTransformer
from xml_microparser.helper import Looper
from xmlmicroparser.transformer import JSONTransformer
from xmlmicroparser.helper import Looper


class Parser():
Expand Down
4 changes: 1 addition & 3 deletions src/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
# . XML Microparser Python Module .
# ]*[ --------------------------------------------------------------------- ]*[
# . .
# . Copyright Claus Prüfer 2016-2019 .
# . Copyright Claus Prüfer 2016-2024 .
# . .
# . XML Parser JSON Transformer Module .
# . .
# ]*[ --------------------------------------------------------------------- ]*[

# -*- coding:utf-8 -*-

import json
import logging

Expand Down

0 comments on commit 3139148

Please sign in to comment.