Jez Higgins

Freelance software generalist
software created
extended or repaired


Older posts are available in the archive or through tags.

Feed

Follow me on Twitter
My code on GitHub

Contact
About

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 generalist
software created
extended or repaired

Older posts are available in the archive or through tags.

Feed

Follow me on Twitter
My code on GitHub

Contact
About