\section{ost::XMLStream Class Reference} \label{classost_1_1_x_m_l_stream}\index{ost::XMLStream@{ost::XMLStream}} This class impliments a basic XML stream parser that can be used to examine an XML resource thru virtual I/O methods.XML Stream Parser (SAX). {\tt \#include $<$xml.h$>$} Inheritance diagram for ost::XMLStream::\begin{figure}[H] \begin{center} \leavevmode \includegraphics[height=2cm]{classost_1_1_x_m_l_stream} \end{center} \end{figure} \subsection*{Public Member Functions} \begin{CompactItemize} \item virtual bool {\bf open} (const char $\ast$resource) \begin{CompactList}\small\item\em May perform an open operation on behalf of a parsed resource. \item\end{CompactList}\item virtual void {\bf close} (void) \begin{CompactList}\small\item\em May perform a close operation of an i/o source when the parser has completed operation. \item\end{CompactList}\item virtual {\bf Slog::Level} {\bf get\-Logging} (void) \begin{CompactList}\small\item\em Get error logging level. \item\end{CompactList}\item virtual void {\bf comment} (const unsigned char $\ast$text, size\_\-t len) \begin{CompactList}\small\item\em Virtual to receive embedded comments in an XML document being parsed. \item\end{CompactList}\item virtual int {\bf read} (unsigned char $\ast$buffer, size\_\-t len)=0 \begin{CompactList}\small\item\em Read method to aquire data for the parser. \item\end{CompactList}\item virtual void {\bf characters} (const unsigned char $\ast$text, size\_\-t len)=0 \begin{CompactList}\small\item\em Virtual to receive character text extracted from the document in the current element. \item\end{CompactList}\item virtual void {\bf start\-Document} (void) \begin{CompactList}\small\item\em Identify start of document event. \item\end{CompactList}\item virtual void {\bf end\-Document} (void) \begin{CompactList}\small\item\em Identify end of document event. \item\end{CompactList}\item virtual void {\bf start\-Element} (const unsigned char $\ast$name, const unsigned char $\ast$$\ast$attr)=0 \begin{CompactList}\small\item\em Identify start of an element in the document. \item\end{CompactList}\item virtual void {\bf end\-Element} (const unsigned char $\ast$name)=0 \begin{CompactList}\small\item\em Identify end of an element in the document. \item\end{CompactList}\item bool {\bf parse} (const char $\ast$resource=NULL) \begin{CompactList}\small\item\em Parse a resource as a stream thru the virtual read method. \item\end{CompactList}\end{CompactItemize} \subsection*{Protected Member Functions} \begin{CompactItemize} \item virtual {\bf $\sim$XMLStream} () \end{CompactItemize} \subsection{Detailed Description} This class impliments a basic XML stream parser that can be used to examine an XML resource thru virtual I/O methods.XML Stream Parser (SAX). This class must be derived into one that can impliment the physical I/O required to parse actual data. A mixer class using {\bf XMLStream}{\rm (p.\,\pageref{classost_1_1_x_m_l_stream})} and {\bf URLStream}{\rm (p.\,\pageref{classost_1_1_u_r_l_stream})} would seem a likely combination for this purpose. \begin{Desc} \item[Author:]David Sugar $<${\tt dyfet@ostel.com}$>$ \end{Desc} \begin{Desc} \item[Examples: ]\par {\bf xmlfetch.cpp}.\end{Desc} \subsection{Constructor \& Destructor Documentation} \index{ost::XMLStream@{ost::XMLStream}!~XMLStream@{$\sim$XMLStream}} \index{~XMLStream@{$\sim$XMLStream}!ost::XMLStream@{ost::XMLStream}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual ost::XMLStream::$\sim$XMLStream ()\hspace{0.3cm}{\tt [protected, virtual]}}\label{classost_1_1_x_m_l_stream_71e5d08fcb8ef8a5a91c7aec12111d32} \subsection{Member Function Documentation} \index{ost::XMLStream@{ost::XMLStream}!characters@{characters}} \index{characters@{characters}!ost::XMLStream@{ost::XMLStream}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void ost::XMLStream::characters (const unsigned char $\ast$ {\em text}, size\_\-t {\em len})\hspace{0.3cm}{\tt [pure virtual]}}\label{classost_1_1_x_m_l_stream_f0962a8d37d7a17d8aff75c9409bf72f} Virtual to receive character text extracted from the document in the current element. \begin{Desc} \item[Parameters:] \begin{description} \item[{\em text}]received. \item[{\em len}]length of text received. \end{description} \end{Desc} \begin{Desc} \item[Examples: ]\par {\bf xmlfetch.cpp}.\end{Desc} \index{ost::XMLStream@{ost::XMLStream}!close@{close}} \index{close@{close}!ost::XMLStream@{ost::XMLStream}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void ost::XMLStream::close (void)\hspace{0.3cm}{\tt [virtual]}}\label{classost_1_1_x_m_l_stream_5a581fb0b2875b0714a893837e2e5d11} May perform a close operation of an i/o source when the parser has completed operation. \index{ost::XMLStream@{ost::XMLStream}!comment@{comment}} \index{comment@{comment}!ost::XMLStream@{ost::XMLStream}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void ost::XMLStream::comment (const unsigned char $\ast$ {\em text}, size\_\-t {\em len})\hspace{0.3cm}{\tt [virtual]}}\label{classost_1_1_x_m_l_stream_d0dce01d08f35d642960867c0f5ccfbd} Virtual to receive embedded comments in an XML document being parsed. \begin{Desc} \item[Parameters:] \begin{description} \item[{\em text}]text comment extracted. \item[{\em len}]length of comment. \end{description} \end{Desc} \begin{Desc} \item[Examples: ]\par {\bf xmlfetch.cpp}.\end{Desc} \index{ost::XMLStream@{ost::XMLStream}!endDocument@{endDocument}} \index{endDocument@{endDocument}!ost::XMLStream@{ost::XMLStream}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void ost::XMLStream::end\-Document (void)\hspace{0.3cm}{\tt [virtual]}}\label{classost_1_1_x_m_l_stream_bc1e0f16c8100aadfde6acec56c2029e} Identify end of document event. \begin{Desc} \item[Examples: ]\par {\bf xmlfetch.cpp}.\end{Desc} \index{ost::XMLStream@{ost::XMLStream}!endElement@{endElement}} \index{endElement@{endElement}!ost::XMLStream@{ost::XMLStream}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void ost::XMLStream::end\-Element (const unsigned char $\ast$ {\em name})\hspace{0.3cm}{\tt [pure virtual]}}\label{classost_1_1_x_m_l_stream_74d63a5adf80d81d61888aad632f2b7d} Identify end of an element in the document. \begin{Desc} \item[Parameters:] \begin{description} \item[{\em name}]of element found. \end{description} \end{Desc} \begin{Desc} \item[Examples: ]\par {\bf xmlfetch.cpp}.\end{Desc} \index{ost::XMLStream@{ost::XMLStream}!getLogging@{getLogging}} \index{getLogging@{getLogging}!ost::XMLStream@{ost::XMLStream}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf Slog::Level} ost::XMLStream::get\-Logging (void)\hspace{0.3cm}{\tt [virtual]}}\label{classost_1_1_x_m_l_stream_1981d1aa643f5aad965693c7a4132502} Get error logging level. \begin{Desc} \item[Returns:]error logging level. \end{Desc} \index{ost::XMLStream@{ost::XMLStream}!open@{open}} \index{open@{open}!ost::XMLStream@{ost::XMLStream}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool ost::XMLStream::open (const char $\ast$ {\em resource})\hspace{0.3cm}{\tt [virtual]}}\label{classost_1_1_x_m_l_stream_499e60e5b1b0e88d2f856e4bc8c63db8} May perform an open operation on behalf of a parsed resource. In some cases, the parser may be merged with a class that already has performed some kind of open, and this method can then be ignored. \begin{Desc} \item[Returns:]true if open is successful. \end{Desc} \begin{Desc} \item[Parameters:] \begin{description} \item[{\em resource}]passed to Parse methods. \end{description} \end{Desc} \index{ost::XMLStream@{ost::XMLStream}!parse@{parse}} \index{parse@{parse}!ost::XMLStream@{ost::XMLStream}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool ost::XMLStream::parse (const char $\ast$ {\em resource} = {\tt NULL})}\label{classost_1_1_x_m_l_stream_98568a87c3d747583f8851f6d3f9fb1d} Parse a resource as a stream thru the virtual read method. \begin{Desc} \item[Returns:]true if well formed document has been fully parsed. \end{Desc} \begin{Desc} \item[Parameters:] \begin{description} \item[{\em resource}]optional name of resource. \end{description} \end{Desc} \index{ost::XMLStream@{ost::XMLStream}!read@{read}} \index{read@{read}!ost::XMLStream@{ost::XMLStream}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int ost::XMLStream::read (unsigned char $\ast$ {\em buffer}, size\_\-t {\em len})\hspace{0.3cm}{\tt [pure virtual]}}\label{classost_1_1_x_m_l_stream_64e401b6b98c28523719d021f11acd52} Read method to aquire data for the parser. \begin{Desc} \item[Returns:]number of bytes actually read. \end{Desc} \begin{Desc} \item[Parameters:] \begin{description} \item[{\em buffer}]to read data into. \item[{\em len}]number of bytes to read. \end{description} \end{Desc} \begin{Desc} \item[Examples: ]\par {\bf xmlfetch.cpp}.\end{Desc} \index{ost::XMLStream@{ost::XMLStream}!startDocument@{startDocument}} \index{startDocument@{startDocument}!ost::XMLStream@{ost::XMLStream}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void ost::XMLStream::start\-Document (void)\hspace{0.3cm}{\tt [virtual]}}\label{classost_1_1_x_m_l_stream_4a4305dffd6b1eb7cdb6afd373fec8ef} Identify start of document event. \begin{Desc} \item[Examples: ]\par {\bf xmlfetch.cpp}.\end{Desc} \index{ost::XMLStream@{ost::XMLStream}!startElement@{startElement}} \index{startElement@{startElement}!ost::XMLStream@{ost::XMLStream}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void ost::XMLStream::start\-Element (const unsigned char $\ast$ {\em name}, const unsigned char $\ast$$\ast$ {\em attr})\hspace{0.3cm}{\tt [pure virtual]}}\label{classost_1_1_x_m_l_stream_a2ccb9652149b6e461902c102b8ccde6} Identify start of an element in the document. \begin{Desc} \item[Parameters:] \begin{description} \item[{\em name}]of element found. \item[{\em attr}]list of attributes extracted. \end{description} \end{Desc} \begin{Desc} \item[Examples: ]\par {\bf xmlfetch.cpp}.\end{Desc} The documentation for this class was generated from the following file:\begin{CompactItemize} \item {\bf xml.h}\end{CompactItemize}