parser module¶
Test
-
parser.IGNORE= ['id', 'label', 'placeholders', 'class_name']¶ Properties to ignore when parsing.
-
class
parser.Node(id, class_name, properties)[source]¶ Bases:
objectIdentifies a node object, as found in drawio. On one hand used for the individual components, but on the other hand used as a “group” of multiple nodes.
-
exception
parser.ParseException(message)[source]¶ Bases:
ExceptionSemantic exceptions when parsing.
-
class
parser.Parser(filename, setup, ignore_empty_nodes=False)[source]¶ Bases:
objectThe drawio parser.
-
static
decode_and_deflate(data)[source]¶ Draw.io compresses each page as follows: First, all data is url-encoded Next, it is compressed/deflated Finally, it is encoded according to base64.
To obtain the page data, we have to do the reverse.
Returns: Uncompressed and decoded data as a string.
-
static