| Ipelib
    | 
#include <ipeiml.h>
Inherits ipe::XmlParser.
Inherited by PdfStreamParser, and PsStreamParser.
| Public Types | |
| enum | Errors { ESuccess = 0, EVersionTooOld, EVersionTooRecent, ESyntaxError } | 
| Public Member Functions | |
| ImlParser (DataSource &source) | |
| int | parseDocument (Document &doc) | 
| bool | parsePage (Page &page) | 
| Object * | parseObject (String tag, Page *page=0, int *currentLayer=0) | 
| StyleSheet * | parseStyleSheet () | 
| bool | parseStyle (StyleSheet &sheet) | 
| Page * | parsePageSelection () | 
| virtual Buffer | pdfStream (int objNum) | 
| bool | parseBitmap () | 
| bool | parseFontmap (String *stdNames, String *paths) | 
|  Public Member Functions inherited from ipe::XmlParser | |
| XmlParser (DataSource &source) | |
| virtual | ~XmlParser () | 
| int | parsePosition () const | 
| String | parseToTag () | 
| bool | parseAttributes (XmlAttributes &attr, bool qm=false) | 
| bool | parsePCDATA (String tag, String &pcdata) | 
| bool | isTagChar (int ch) | 
| void | getChar () | 
| bool | eos () | 
| void | skipWhitespace () | 
| Additional Inherited Members | |
|  Protected Member Functions inherited from ipe::XmlParser | |
| String | parseToTagX () | 
|  Protected Attributes inherited from ipe::XmlParser | |
| DataSource & | iSource | 
| String | iTopElement | 
| int | iCh | 
| int | iPos | 
XML Parser for Ipe documents and style sheets.
A recursive descent parser for the XML streams.
After experimenting with various XML parsing frameworks, this turned out to work best for Ipe.
| 
 | explicit | 
| int ImlParser::parseDocument | ( | Document & | doc | ) | 
Read a complete document from IML stream.
Returns an error code.
parse an Object.
On calling, stream must be just past the tag.
| StyleSheet * ImlParser::parseStyleSheet | ( | ) | 
parse a complete style sheet.
On calling, stream must be before the 'ipestyle' tag. A <?xml> tag is allowed.
| bool ImlParser::parseStyle | ( | StyleSheet & | sheet | ) | 
Parse a style sheet.
On calling, stream must be just past the style tag.
| Page * ImlParser::parsePageSelection | ( | ) | 
parse an  <ipepage> element (used on clipboard). 
| 
 | 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 ImlParser::parseBitmap | ( | ) | 
Parse an Bitmap.
On calling, stream must be just past bitmap.