hxt-7.1: doc/hvalidator/thesis/x1800.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML
><HEAD
><TITLE
>Module XmlInput</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.77"><LINK
REL="HOME"
TITLE="Design and Implementation of a validating XML parser in Haskell"
HREF="index.html"><LINK
REL="UP"
TITLE="Package hparser"
HREF="c1645.html"><LINK
REL="PREVIOUS"
TITLE="Module XmlParser"
HREF="x1763.html"><LINK
REL="NEXT"
TITLE="Module DTDProcessing"
HREF="x1823.html"></HEAD
><BODY
CLASS="section"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Design and Implementation of a validating XML parser in Haskell: Master's thesis;
University of Applied Sciences Wedel
</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1763.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 3. Package hparser</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1823.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="AEN1800"
></A
>3.4. Module XmlInput</H1
><P
> The module XmlInput provides input functions implemented as filters of type <TT
CLASS="literal"
>XmlStateFilter</TT
>. The main function is <TT
CLASS="function"
>getXmlContents</TT
>, which returns an <TT
CLASS="literal"
>XmlStateFilter</TT
> for reading the content. This filter expects as input a node of type <TT
CLASS="literal"
>NTree XTag</TT
> with several arguments stored in its attribute list. The child list of this node should be empty, because the parsed document will be stored there.
</P
><P
> Protocols like the <SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>http</I
></SPAN
> or <SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>file</I
></SPAN
> protocol are not supported at the moment. Unfortunately there does not seem to exist any Haskell library supporting theses protocols. Perhaps later versions of the parser will use the <TT
CLASS="literal"
>curl</TT
> command.
</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Arguments of getXmlContents</B
></P
><DL
><DT
>Keyword a_source ("source") from module <TT
CLASS="classname"
>XmlKeywords</TT
></DT
><DD
><P
> Specifies input file (or later URL)
</P
></DD
><DT
>Keyword a_encoding ("encoding") from module <TT
CLASS="classname"
>XmlKeywords</TT
></DT
><DD
><P
> Specifies encoding scheme (optional). If no encoding is specified, the parser tries to guess the encoding.
</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1763.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1823.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Module XmlParser</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c1645.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Module DTDProcessing</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>