Jez Higgins

Freelance software grandad
software created
extended or repaired


Follow me on Twitter
Applications, Libraries, Code
Talks & Presentations

Hire me
Contact

Older posts are available in the archive or through tags.

Feed

Thursday 28 August 2003 Arabica: SAX Writer too

To serialise SAX events out as an XML instance you can use SAX/Filter/Writer.h
  SAX::XMLReader<std::wstring> parser;
  SAX::wWriter writer(std::wcout);
  writer.setParent(parser);
  ;... build filter stack here  ...

  SAX::wInputSource is;
  is.setSystemId(L"stdin");
  is.setByteStream(std::cin);

  writer.parse(is);
Writer "kind of" pretty prints, in as much as it tries to indent elements nicely. This will be configurable later on, as will things like turning the XML declaration on and off, declaring a DTD and all the rest of it.
Tagged code, arabica, xml, and c++


Jez Higgins

Freelance software grandad
software created
extended or repaired

Follow me on Twitter
Applications, Libraries, Code
Talks & Presentations

Hire me
Contact

Older posts are available in the archive or through tags.

Feed