Copyright | (c) Ewaryst Schulz, DFKI 2009 |
---|---|
License | GPLv2 or higher, see LICENSE.txt |
Maintainer | ewaryst.schulz@dfki.de |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
Provides the Hexpat parsing and transformation facility to XML.Light types.
- nodesToContent :: [UNode ByteString] -> [Content]
- nodesToContent' :: String -> [UNode ByteString] -> [Content]
- strToCData :: String -> Content
- elemToElem :: ByteString -> UAttributes ByteString -> [UNode ByteString] -> Content
- attrToAttr :: (ByteString, ByteString) -> Attr
- strToQName :: ByteString -> QName
- parseXml :: ByteString -> Either String Element
Interface to the Expat xml parser
nodesToContent :: [UNode ByteString] -> [Content]
Transforms an Expat xml tree to an XML.Light tree
:: String | accumulates text nodes |
-> [UNode ByteString] | list of content items |
-> [Content] |
Version of nodesToContent
with accumulator to minimize the occurrences
of CData
strToCData :: String -> Content
elemToElem :: ByteString -> UAttributes ByteString -> [UNode ByteString] -> Content
attrToAttr :: (ByteString, ByteString) -> Attr
strToQName :: ByteString -> QName
parseXml :: ByteString -> Either String Element