https://github.com/haskell-hvr/x
Light-weight Haskell XML library
https://github.com/haskell-hvr/x
haskell xml
Last synced: 4 months ago
JSON representation
Light-weight Haskell XML library
- Host: GitHub
- URL: https://github.com/haskell-hvr/x
- Owner: haskell-hvr
- License: other
- Created: 2019-07-20T07:15:57.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-25T08:11:42.000Z (over 5 years ago)
- Last Synced: 2025-01-22T08:45:04.990Z (5 months ago)
- Topics: haskell, xml
- Language: Haskell
- Homepage: https://hackage.haskell.org/package/X
- Size: 229 KB
- Stars: 1
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
README
X
=Light-weight Haskell XML library derived from the
[`xml` package](http://hackage.haskell.org/package/xml)
for simple parsing and creation of XML documents.
It only depends on `base`, `bytestring`, `deepseq`, `text`, and `text-short`.Example
-------```
{-# LANGUAGE RecordWildCards, OverloadedStrings #-}
import Text.XMLdata Package = Package
{ pOrderNo :: Text
, pOrderPos :: Text
, pBarcode :: Text
, pNumber :: Text
}-- | Create XML from a Package
instance Node Package where
node qn Package {..} =
node qn
[ unode "package_number" pNumber
, unode "package_barcode" pBarcode
, unode "order_number" pOrderNo
, unode "order_position" pOrderPos
]
```