Modulexml-conduit-1.10.0.0Haskell2010
Text.XML
DOM-based parsing and rendering.
This module requires that all entities be resolved at parsing. If you need to interact with unresolved entities, please use Text.XML.Unresolved. This is the recommended module for most uses cases.
While many of the datatypes in this module are simply re-exported from
Data.XML.Types, Document, Node and Element are all redefined here to
disallow the possibility of unresolved entities. Conversion functions are
provided to switch between the two sets of datatypes.
For simpler, bidirectional traversal of the DOM tree, see the Text.XML.Cursor module.
- 13 types
- 27 values
- Packagexml-conduit-1.10.0.0
- Exports41
- LanguageHaskell2010
- LicenceMIT
- SourceXML.hs
Data types
9 declarationsConstructors
Instances7Eq, Data, Ord, Show, Generic, NFData, …
Eq PrologueDefined in xml-types-0.3.8 · Data.XML.TypesData PrologueDefined in xml-types-0.3.8 · Data.XML.TypesOrd PrologueDefined in xml-types-0.3.8 · Data.XML.TypesShow PrologueDefined in xml-types-0.3.8 · Data.XML.TypesGeneric PrologueDefined in xml-types-0.3.8 · Data.XML.TypesNFData PrologueDefined in xml-types-0.3.8 · Data.XML.Typestype Rep Prologue = D1 ('MetaDataDefined in xml-types-0.3.8 · Data.XML.Types"Prologue"
"Data.XML.Types"
"xml-types-0.3.8-CSCuwNpDX1gGBHfAfAVRIh"
'False) (C1 ('MetaCons"Prologue"
'PrefixI 'True) (S1 ('MetaSel ('Just"prologueBefore"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Miscellaneous]) :*: (S1 ('MetaSel ('Just"prologueDoctype"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Doctype)) :*: S1 ('MetaSel ('Just"prologueAfter"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Miscellaneous]))))
Constructors
Instances7Eq, Data, Ord, Show, Generic, NFData, …
Eq InstructionDefined in xml-types-0.3.8 · Data.XML.TypesData InstructionDefined in xml-types-0.3.8 · Data.XML.TypesOrd InstructionDefined in xml-types-0.3.8 · Data.XML.TypesShow InstructionDefined in xml-types-0.3.8 · Data.XML.TypesGeneric InstructionDefined in xml-types-0.3.8 · Data.XML.TypesNFData InstructionDefined in xml-types-0.3.8 · Data.XML.Typestype Rep Instruction = D1 ('MetaDataDefined in xml-types-0.3.8 · Data.XML.Types"Instruction"
"Data.XML.Types"
"xml-types-0.3.8-CSCuwNpDX1gGBHfAfAVRIh"
'False) (C1 ('MetaCons"Instruction"
'PrefixI 'True) (S1 ('MetaSel ('Just"instructionTarget"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just"instructionData"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))
Constructors
Instances7Eq, Data, Ord, Show, Generic, NFData, …
Eq MiscellaneousDefined in xml-types-0.3.8 · Data.XML.TypesData MiscellaneousDefined in xml-types-0.3.8 · Data.XML.TypesOrd MiscellaneousDefined in xml-types-0.3.8 · Data.XML.TypesShow MiscellaneousDefined in xml-types-0.3.8 · Data.XML.TypesGeneric MiscellaneousDefined in xml-types-0.3.8 · Data.XML.TypesNFData MiscellaneousDefined in xml-types-0.3.8 · Data.XML.Typestype Rep Miscellaneous = D1 ('MetaDataDefined in xml-types-0.3.8 · Data.XML.Types"Miscellaneous"
"Data.XML.Types"
"xml-types-0.3.8-CSCuwNpDX1gGBHfAfAVRIh"
'False) (C1 ('MetaCons"MiscInstruction"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Instruction)) :+: C1 ('MetaCons"MiscComment"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))
Instances6Eq, Data, Ord, Show, NFData, ToMarkup
Eq NodeDefined in xml-conduit-1.10.0.0 · Text.XMLData NodeDefined in xml-conduit-1.10.0.0 · Text.XMLOrd NodeDefined in xml-conduit-1.10.0.0 · Text.XMLShow NodeDefined in xml-conduit-1.10.0.0 · Text.XMLNFData NodeDefined in xml-conduit-1.10.0.0 · Text.XMLToMarkup NodeDefined in xml-conduit-1.10.0.0 · Text.XML
Constructors
Instances6Eq, Data, Ord, Show, NFData, ToMarkup
Eq ElementDefined in xml-conduit-1.10.0.0 · Text.XMLData ElementDefined in xml-conduit-1.10.0.0 · Text.XMLOrd ElementDefined in xml-conduit-1.10.0.0 · Text.XMLShow ElementDefined in xml-conduit-1.10.0.0 · Text.XMLNFData ElementDefined in xml-conduit-1.10.0.0 · Text.XMLToMarkup ElementDefined in xml-conduit-1.10.0.0 · Text.XMLNote that the special element name
{http:/www.snoyman.comxml2html}ie-condwith the single attributecondis used to indicate an IE conditional comment.
A fully qualified name.
Prefixes are not semantically important; they are included only to simplify pass-through parsing. When comparing names with Eq or Ord methods, prefixes are ignored.
The IsString instance supports Clark notation; see
http://www.jclark.com/xml/xmlns.htm and
http://infohost.nmt.edu/tcc/help/pubs/pylxml/etree-QName.html. Use
the OverloadedStrings language extension for very simple Name
construction:
myname :: Name
myname = "{http://example.com/ns/my-namespace}my-name"Constructors
Instances8Eq, Data, Ord, Show, IsString, Generic, …
Eq NameDefined in xml-types-0.3.8 · Data.XML.TypesData NameDefined in xml-types-0.3.8 · Data.XML.TypesOrd NameDefined in xml-types-0.3.8 · Data.XML.TypesShow NameDefined in xml-types-0.3.8 · Data.XML.TypesIsString NameDefined in xml-types-0.3.8 · Data.XML.TypesGeneric NameDefined in xml-types-0.3.8 · Data.XML.TypesNFData NameDefined in xml-types-0.3.8 · Data.XML.Typestype Rep Name = D1 ('MetaDataDefined in xml-types-0.3.8 · Data.XML.Types"Name"
"Data.XML.Types"
"xml-types-0.3.8-CSCuwNpDX1gGBHfAfAVRIh"
'False) (C1 ('MetaCons"Name"
'PrefixI 'True) (S1 ('MetaSel ('Just"nameLocalName"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just"nameNamespace"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just"namePrefix"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)))))
Note: due to the incredible complexity of DTDs, this type only supports external subsets. I've tried adding internal subset types, but they quickly gain more code than the rest of this module put together.
It is possible that some future version of this library might support internal subsets, but I am no longer actively working on adding them.
Constructors
Instances7Eq, Data, Ord, Show, Generic, NFData, …
Eq DoctypeDefined in xml-types-0.3.8 · Data.XML.TypesData DoctypeDefined in xml-types-0.3.8 · Data.XML.TypesOrd DoctypeDefined in xml-types-0.3.8 · Data.XML.TypesShow DoctypeDefined in xml-types-0.3.8 · Data.XML.TypesGeneric DoctypeDefined in xml-types-0.3.8 · Data.XML.TypesNFData DoctypeDefined in xml-types-0.3.8 · Data.XML.Typestype Rep Doctype = D1 ('MetaDataDefined in xml-types-0.3.8 · Data.XML.Types"Doctype"
"Data.XML.Types"
"xml-types-0.3.8-CSCuwNpDX1gGBHfAfAVRIh"
'False) (C1 ('MetaCons"Doctype"
'PrefixI 'True) (S1 ('MetaSel ('Just"doctypeName"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just"doctypeID"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ExternalID))))
Instances7Eq, Data, Ord, Show, Generic, NFData, …
Eq ExternalIDDefined in xml-types-0.3.8 · Data.XML.TypesData ExternalIDDefined in xml-types-0.3.8 · Data.XML.TypesOrd ExternalIDDefined in xml-types-0.3.8 · Data.XML.TypesShow ExternalIDDefined in xml-types-0.3.8 · Data.XML.TypesGeneric ExternalIDDefined in xml-types-0.3.8 · Data.XML.TypesNFData ExternalIDDefined in xml-types-0.3.8 · Data.XML.Typestype Rep ExternalID = D1 ('MetaDataDefined in xml-types-0.3.8 · Data.XML.Types"ExternalID"
"Data.XML.Types"
"xml-types-0.3.8-CSCuwNpDX1gGBHfAfAVRIh"
'False) (C1 ('MetaCons"SystemID"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons"PublicID"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))
Parsing
0 declarationsFiles
Bytes
Text
Other
Constructors
Instances2Show, Exception
Show UnresolvedEntityExceptionDefined in xml-conduit-1.10.0.0 · Text.XMLException UnresolvedEntityExceptionDefined in xml-conduit-1.10.0.0 · Text.XML
Constructors
Instances2Show, Exception
Show XMLExceptionDefined in xml-conduit-1.10.0.0 · Text.XMLException XMLExceptionDefined in xml-conduit-1.10.0.0 · Text.XML
Rendering
4 declarationsSettings
1 declarationThe default value for this type.
Parsing
Instances1Default
Default ParseSettingsDefined in xml-conduit-1.10.0.0 · Text.XML.Stream.Parse
Whether the original xmlns attributes should be retained in the parsed values. For more information on motivation, see:
https://github.com/snoyberg/xml/issues/38
Default: False
Since 1.2.1
Entity decoding
Default implementation of DecodeEntities, which leaves the entity as-is. Numeric character references and the five standard entities (lt, gt, amp, quot, pos) are handled internally by the parser.
HTML4-compliant entity decoder. Handles the additional 248 entities defined by HTML 4 and XHTML 1.
Note that HTML 5 introduces a drastically larger number of entities, and this code does not recognize most of them.
Rendering
Instances1Default
Default RenderSettingsDefined in xml-conduit-1.10.0.0 · Text.XML.Stream.Render.Internal
Defines some top level namespace definitions to be used, in the form of (prefix, namespace). This has absolutely no impact on the meaning of your documents, but can increase readability by moving commonly used namespace declarations to the top level.
Specify how to turn the unordered attributes used by the Text.XML module into an ordered list.
Determines if for a given text content the renderer should use a CDATA node.
Default: False
Determines whether the XML declaration will be output.
Default: True
Convenience function to create an ordering function suitable for use as the value of rsAttrOrder. The ordering function is created from an explicit ordering of the attributes, specified as a list of tuples, as follows: In each tuple, the first component is the Name of an element, and the second component is a list of attributes names. When the given element is rendered, the attributes listed, when present, appear first in the given order, followed by any other attributes in arbitrary order. If an element does not appear, all of its attributes are rendered in arbitrary order.