[initial attempt at a migration guide from HaXml 1.13 to devel version Malcolm.Wallace@cs.york.ac.uk**20061106113856] { addfile ./docs/migrate.html hunk ./docs/migrate.html 1 + + HaXml: Haskell and XML + + + +
+

Migrating from HaXml 1.13 to HaXml >= 1.17

+
+
+ +

+There are 3 main changes between 1.13 and 1.17: + +

More info fields in the generic document tree

+Content items in the generic document representation now have an +extra polymorphic component field. This can be used for +propagating information throughout the document tree, like +namespace scopes. However, if you simply want to change some old +code to use the new types, essentially you can just use unit +() values as dummies to fill in this field. + +

+data Document --> data Document i + +

+data Element --> data Element i + +

+data Content --> data Content i + +

New XmlContent class, replaces old classes

+The Haskell2Xml and Xml2Haskell classes have been +merged into a single new class: XmlContent. Because the new +class is based on combinator parsers that return good error +messages, some of the signatures of user-accessible I/O routines +have changed to enable the possibility of reporting parse errors. + +

Lazy parsing

+Parsing of generic XML documents can now be lazy, that is, it can +start returning part of the document tree, before seeing the end of +it. However, this does mean that parse errors can be discovered +too late to do anything sensible with them - your program will +likely just stop with the error message. To use the lazy parser, + +

+import Text.XML.HaXml.Parse --> import Text.XML.HaXml.ParseLazy + + +


+ + + }