# IpeImlParser Class Reference
[Ipe Management]

Ipe XML Parser. More...

Inherits IpeXmlParser.

Inherited by IpePdfStreamParser, and IpePsStreamParser.

List of all members.

## Public Member Functions

- IpeImlParser (IpeDataSource &source, IpeRepository *rep)
- bool ParseDocument (IpeDocument &doc, int &requires)
- bool ParsePage (IpePage &page)
- IpeObject * ParseObject (IpeString tag, IpePage *page=0, int *currentLayer=0)
- IpeStyleSheet * ParseStyleSheet ()
- bool ParseStyle (IpeStyleSheet &sheet, bool inDoc)
- bool ParseSelection (IpePgObjectSeq &seq)
- IpePage * ParsePageSelection ()
- virtual IpeBuffer PdfStream (int objNum)
- bool ParseBitmap ()
- bool ParseFontmap (IpeString *stdNames, IpeString *paths)

## Detailed Description

Ipe XML Parser.

A recursive descent parser for the Ipe XML streams.

After experimenting with various XML parsing frameworks, this turned out to work best for Ipe.

## Member Function Documentation

bool IpeImlParser::ParseDocument | ( | IpeDocument & | doc,
|  | int & | requires |
| ) |  |  |

Read a complete Ipe document from IML stream.

Sets requires to the Ipelib version required by the document, e.g. 60100 for the Ipelib of Ipe 6.1. The version is not actually checked, so parsing continues (until an error occurs).

bool IpeImlParser::ParsePage | ( | IpePage & | page | ) |

Parse an IpePage.

On calling, stream must be just past `page`.

IpeObject * IpeImlParser::ParseObject | ( | IpeString | tag,
|  | IpePage * | page = `0`,
|  | int * | currentLayer = `0` |
| ) |  |  |

Parse an IpeObject.

On calling, stream must be just past the tag.

IpeStyleSheet * IpeImlParser::ParseStyleSheet | ( |  | ) |

Parse a complete style sheet.

On calling, stream must be before the 'ipestyle' tag. A <?xml> tag is allowed.

bool IpeImlParser::ParseStyle | ( | IpeStyleSheet & | sheet,
|  | bool | inDoc |
| ) |  |  |

Parse a style sheet.

On calling, stream must be just past the style tag.

bool IpeImlParser::ParseSelection | ( | IpePgObjectSeq & | seq | ) |

Parse an `` <ipeselection> element.

An IpePgObjectSeq is used to own the objects, but selection mode and layer are not set.

IpePage * IpeImlParser::ParsePageSelection | ( |  | ) |

Parse an `` <ipepage> element (used on clipboard).

IpeBuffer IpeImlParser::PdfStream | ( | int | objNum | ) | `[virtual]`

XML contents can refer to data in PDF.

If the XML stream is embedded in a PDF file, XML contents can refer to PDF objects. A derived parser must implement this method to access PDF data.

It is assumed that PDF object objNum is a stream. Its contents (uncompressed!) is returned in a buffer.

bool IpeImlParser::ParseBitmap | ( |  | ) |

Parse an IpeBitmap.

On calling, stream must be just past `bitmap`.

The documentation for this class was generated from the following files:

- ipeiml.h
- ipeiml.cpp