hxt-9.3.1.18: A collection of tools for processing XML with Haskell.

Copyright | Copyright (C) 2005 Uwe Schmidt
License | MIT
Maintainer | Uwe Schmidt (uwe@fh-wedel.de)
Stability | experimental
Portability | portable
Safe Haskell | None
Language | Haskell98

Text.XML.HXT.Parser.XmlParsec

Description

Xml Parsec parser with pure filter interface

Synopsis

- charData :: XParser s XmlTrees
- charData' :: XParser s XmlTree
- comment :: XParser s XmlTree
- pI :: XParser s XmlTree
- cDSect :: XParser s XmlTree
- document :: XParser s XmlTree
- document' :: XParser s XmlTrees
- prolog :: XParser s XmlTrees
- xMLDecl :: XParser s XmlTrees
- xMLDecl' :: XParser s XmlTrees
- versionInfo :: XParser s XmlTrees
- misc :: XParser s XmlTree
- doctypedecl :: XParser s XmlTrees
- markupdecl :: XParser s XmlTrees
- sDDecl :: XParser s XmlTrees
- element :: XParser s XmlTree
- content :: XParser s XmlTrees
- contentWithTextDecl :: XParser s XmlTrees
- textDecl :: XParser s XmlTrees
- encodingDecl :: XParser s XmlTrees
- xread :: String -> XmlTrees
- xreadDoc :: String -> XmlTrees
- parseXmlContent :: XmlTree -> XmlTrees
- parseXmlDocEncodingSpec :: XmlTree -> XmlTrees
- parseXmlDocument :: String -> String -> XmlTrees
- parseXmlDTDPart :: String -> XmlTree -> XmlTrees
- parseXmlEncodingSpec :: SimpleXParser XmlTree -> XmlTree -> XmlTrees
- parseXmlEntityEncodingSpec :: XmlTree -> XmlTrees
- parseXmlEntityValueAsAttrValue :: String -> XmlTree -> XmlTrees
- parseXmlEntityValueAsContent :: String -> XmlTree -> XmlTrees
- parseXmlPart :: SimpleXParser XmlTrees -> String -> String -> XmlTree -> XmlTrees
- parseXmlText :: SimpleXParser XmlTrees -> XPState () -> String -> XmlTree -> XmlTrees
- parseNMToken :: String -> XmlTree -> XmlTrees
- parseName :: String -> XmlTree -> XmlTrees
- removeEncodingSpec :: XmlTree -> XmlTrees

# Documentation

charData :: XParser s XmlTrees Source #

charData' :: XParser s XmlTree Source #

comment :: XParser s XmlTree Source #

pI :: XParser s XmlTree Source #

cDSect :: XParser s XmlTree Source #

document :: XParser s XmlTree Source #

document' :: XParser s XmlTrees Source #

prolog :: XParser s XmlTrees Source #

xMLDecl :: XParser s XmlTrees Source #

xMLDecl' :: XParser s XmlTrees Source #

versionInfo :: XParser s XmlTrees Source #

misc :: XParser s XmlTree Source #

doctypedecl :: XParser s XmlTrees Source #

markupdecl :: XParser s XmlTrees Source #

sDDecl :: XParser s XmlTrees Source #

element :: XParser s XmlTree Source #

content :: XParser s XmlTrees Source #

contentWithTextDecl :: XParser s XmlTrees Source #

textDecl :: XParser s XmlTrees Source #

encodingDecl :: XParser s XmlTrees Source #

xread :: String -> XmlTrees Source #

the inverse function to `xshow`, (for XML content).

the string parameter is parsed with the XML content parser. result is the list of trees or in case of an error a single element list with the error message as node. No entity or character subtitution is done here, but the XML parser can do this for the predefined XML or the char references for performance reasons

see also: `parseXmlContent`

xreadDoc :: String -> XmlTrees Source #

parseXmlContent :: XmlTree -> XmlTrees Source #

the filter version of `xread`

parseXmlDocEncodingSpec :: XmlTree -> XmlTrees Source #

parseXmlDocument :: String -> String -> XmlTrees Source #

parseXmlDTDPart :: String -> XmlTree -> XmlTrees Source #

Parser for parts of a DTD

parseXmlEncodingSpec :: SimpleXParser XmlTree -> XmlTree -> XmlTrees Source #

try to parse a xml encoding spec.

- 1.parameter encParse : the parser for the encoding decl
- 2.parameter root : a document root
- returns : the same tree, but with an additional attribute "encoding" in the root node in case of a valid encoding spec else the unchanged tree

parseXmlEntityEncodingSpec :: XmlTree -> XmlTrees Source #

parseXmlEntityValueAsAttrValue :: String -> XmlTree -> XmlTrees Source #

Parser for entity substitution within attribute values

parseXmlEntityValueAsContent :: String -> XmlTree -> XmlTrees Source #

Parser for general entites

parseXmlPart :: SimpleXParser XmlTrees -> String -> String -> XmlTree -> XmlTrees Source #

general parser for parsing arbitray parts of a XML document

parseXmlText :: SimpleXParser XmlTrees -> XPState () -> String -> XmlTree -> XmlTrees Source #

a more general version of `parseXmlContent`. The parser to be used and the context are extra parameter

parseNMToken :: String -> XmlTree -> XmlTrees Source #

Parser for NMTOKENs

parseName :: String -> XmlTree -> XmlTrees Source #

Parser for XML names

removeEncodingSpec :: XmlTree -> XmlTrees Source #