%PDF- %PDF-
Direktori : /lib/python3/dist-packages/reportlab/lib/__pycache__/ |
Current File : //lib/python3/dist-packages/reportlab/lib/__pycache__/rparsexml.cpython-312.pyc |
� �e�G � � � d Z dZ dZddlZd� Z ej ddddedd�� Zdddi fd�Z G d� d � Z e � Z d Z dZdZdZ ee � ZdZg d �Zd� Zddefd�ZereZd� ZdZd� Zddefd�Zd� Zdd�Zdd�Zedk( r� ed�� ddlZddlZddlmZ ddlZ e� Z dZ!ejD dd D ]j Z#ejH jK e#� s e&d� �' e'e#� 5 Z(e(jS � Z*ddd� e&de#�d ee*� � �� ee*d�� e!dz Z!�l e!r e&d e� e z d�d�� yyy# e$ r dZY ��w xY w# 1 sw Y �VxY w) at Very simple and fast XML parser, used for intra-paragraph text. Devised by Aaron Watters in the bad old days before Python had fast parsers available. Constructs the lightest possible in-memory representation; parses most files we have seen in pure python very quickly. The output structure is the same as the one produced by pyRXP, our validating C-based parser, which was written later. It will use pyRXP if available. This is used to parse intra-paragraph markup. Example parse:: <this type="xml">text <b>in</b> xml</this> ( "this", {"type": "xml"}, [ "text ", ("b", None, ["in"], None), " xml" ] None ) { 0: "this" "type": "xml" 1: ["text ", {0: "b", 1:["in"]}, " xml"] } Ie, xml tag translates to a tuple: (name, dictofattributes, contentlist, miscellaneousinfo) where miscellaneousinfo can be anything, (but defaults to None) (with the intention of adding, eg, line number information) special cases: name of "" means "top level, no containing tag". Top level parse always looks like this:: ("", list, None, None) contained text of None means <simple_tag/> In order to support stuff like:: <this></this><one></one> AT THE MOMENT & ETCETERA ARE IGNORED. THEY MUST BE PROCESSED IN A POST-PROCESSING STEP. PROLOGUES ARE NOT UNDERSTOOD. OTHER STUFF IS PROBABLY MISSING. � Nc � � t | � y )N)�print)�ss �9/usr/lib/python3/dist-packages/reportlab/lib/rparsexml.py�warnCBr >