\hypertarget{votElement_8c}{
\section{votElement.c File Reference}
\label{votElement_8c}\index{votElement.c@{votElement.c}}
}
(Private) Methods to manage XML elements.  


{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$unistd.h$>$}\par
{\tt \#include $<$string.h$>$}\par
{\tt \#include \char`\"{}votParseP.h\char`\"{}}\par
{\tt \#include \char`\"{}votParse.h\char`\"{}}\par
\subsection*{Defines}
\begin{CompactItemize}
\item 
\hypertarget{votElement_8c_90be22d8acb5e625e96c4bd621873ab1}{
\#define \textbf{outstr}(s)~strcat(XML\_\-out,s);}
\label{votElement_8c_90be22d8acb5e625e96c4bd621873ab1}

\item 
\hypertarget{votElement_8c_f18db8ab48febb9b448b5c42bba6c8ef}{
\#define \textbf{outattr}(a, s)~\{outstr(a);outstr(s);outstr(\char`\"{}$\backslash$\char`\"{}\char`\"{});\}}
\label{votElement_8c_f18db8ab48febb9b448b5c42bba6c8ef}

\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
int \hyperlink{votElement_8c_c40e3a809b3865bd6d15bf368778e28e}{vot\_\-elemType} (\hyperlink{structElement}{Element} $\ast$e)
\begin{CompactList}\small\item\em Get the integer value (ID) of the \hyperlink{structElement}{Element} (private method). \item\end{CompactList}\item 
char $\ast$ \hyperlink{votElement_8c_73381f6c3509c61194a8f23ada4cac2a}{vot\_\-elemName} (\hyperlink{structElement}{Element} $\ast$e)
\begin{CompactList}\small\item\em Get the name of the \hyperlink{structElement}{Element} (private method). \item\end{CompactList}\item 
int \hyperlink{votElement_8c_c247ed61c78db54860fbbf80385f3088}{vot\_\-eType} (char $\ast$\hyperlink{votElement_8c_5ac083a645d964373f022d03df4849c8}{name})
\begin{CompactList}\small\item\em Get the integer value (ID) of the name (private method). \item\end{CompactList}\item 
char $\ast$ \hyperlink{votElement_8c_bb085dd4a9d1237b43a7db3cb2a192d2}{vot\_\-elemXMLEnd} (\hyperlink{structElement}{Element} $\ast$e)
\begin{CompactList}\small\item\em Build a string of the ending XML Tag (private method). \item\end{CompactList}\item 
char $\ast$ \hyperlink{votElement_8c_478f5d941afc5695c98627cdbdfd6844}{vot\_\-elemXML} (\hyperlink{structElement}{Element} $\ast$e)
\begin{CompactList}\small\item\em Builds a string of the opening XML Tag (private method). \item\end{CompactList}\item 
\hyperlink{structElement}{Element} $\ast$ \hyperlink{votElement_8c_744db49ce83f6ed1d76b7aa4eacd9dd9}{vot\_\-newElem} (unsigned int type)
\begin{CompactList}\small\item\em Allocate a new structure of the given type (private method). \item\end{CompactList}\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
\hypertarget{votElement_8c_f5f0a3fb300a5bd99957571039f334c2}{
\begin{tabbing}
xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=\kill
struct \{\\
\>int \textbf{type}\\
\>char $\ast$ \hyperlink{votElement_8c_5ac083a645d964373f022d03df4849c8}{name}\\
\} \textbf{elemTypes} \mbox{[}$\,$\mbox{]}}
\label{votElement_8c_f5f0a3fb300a5bd99957571039f334c2}
\\

\end{tabbing}\item 
\begin{tabbing}
xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=\kill
struct \{\\
\>int \textbf{type}\\
\>char $\ast$ \hyperlink{votElement_8c_b47351fd475e3902c6d5da9e09474834}{req}\\
\>char $\ast$ \hyperlink{votElement_8c_64794c1524dec8e3f98417a50ad08224}{opt}\\
\} \hyperlink{votElement_8c_3e26a3122260ebbdfd356ff07e308159}{elemAttrs} \mbox{[}$\,$\mbox{]}\\

\end{tabbing}\end{CompactItemize}


\label{_details}
\hypertarget{_details}{}
\subsection{Detailed Description}
(Private) Methods to manage XML elements. 

VOTELEMENT.C -- (Private) Method to manage XML elements.

\begin{Desc}
\item[Author:]Mike Fitzpatrick and Eric Timmermann \end{Desc}
\begin{Desc}
\item[Date:]8/03/09 \end{Desc}


\subsection{Function Documentation}
\hypertarget{votElement_8c_73381f6c3509c61194a8f23ada4cac2a}{
\index{votElement.c@{votElement.c}!vot\_\-elemName@{vot\_\-elemName}}
\index{vot\_\-elemName@{vot\_\-elemName}!votElement.c@{votElement.c}}
\subsubsection[{vot\_\-elemName}]{\setlength{\rightskip}{0pt plus 5cm}char $\ast$ vot\_\-elemName ({\bf Element} $\ast$ {\em e})}}
\label{votElement_8c_73381f6c3509c61194a8f23ada4cac2a}


Get the name of the \hyperlink{structElement}{Element} (private method). 

vot\_\-elemName -- Get the name of the \hyperlink{structElement}{Element} (private method).

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em $\ast$e}]A pointer to the \hyperlink{structElement}{Element} that you want the name of \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A string pointer to the name of the element \end{Desc}
\hypertarget{votElement_8c_c40e3a809b3865bd6d15bf368778e28e}{
\index{votElement.c@{votElement.c}!vot\_\-elemType@{vot\_\-elemType}}
\index{vot\_\-elemType@{vot\_\-elemType}!votElement.c@{votElement.c}}
\subsubsection[{vot\_\-elemType}]{\setlength{\rightskip}{0pt plus 5cm}int vot\_\-elemType ({\bf Element} $\ast$ {\em e})}}
\label{votElement_8c_c40e3a809b3865bd6d15bf368778e28e}


Get the integer value (ID) of the \hyperlink{structElement}{Element} (private method). 

vot\_\-elemType -- Get the integer value (ID) of the \hyperlink{structElement}{Element} (private method)

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em e}]A pointer to the \hyperlink{structElement}{Element} that you want the type of \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]An integer corresponding to the type of the element \end{Desc}
\hypertarget{votElement_8c_478f5d941afc5695c98627cdbdfd6844}{
\index{votElement.c@{votElement.c}!vot\_\-elemXML@{vot\_\-elemXML}}
\index{vot\_\-elemXML@{vot\_\-elemXML}!votElement.c@{votElement.c}}
\subsubsection[{vot\_\-elemXML}]{\setlength{\rightskip}{0pt plus 5cm}char $\ast$ vot\_\-elemXML ({\bf Element} $\ast$ {\em e})}}
\label{votElement_8c_478f5d941afc5695c98627cdbdfd6844}


Builds a string of the opening XML Tag (private method). 

vot\_\-elemXML -- Builds a string of the opening XML Tag (private method)

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em $\ast$e}]A pointer to an \hyperlink{structElement}{Element} \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A string that contains the opening XML tag for e \end{Desc}
\hypertarget{votElement_8c_bb085dd4a9d1237b43a7db3cb2a192d2}{
\index{votElement.c@{votElement.c}!vot\_\-elemXMLEnd@{vot\_\-elemXMLEnd}}
\index{vot\_\-elemXMLEnd@{vot\_\-elemXMLEnd}!votElement.c@{votElement.c}}
\subsubsection[{vot\_\-elemXMLEnd}]{\setlength{\rightskip}{0pt plus 5cm}char $\ast$ vot\_\-elemXMLEnd ({\bf Element} $\ast$ {\em e})}}
\label{votElement_8c_bb085dd4a9d1237b43a7db3cb2a192d2}


Build a string of the ending XML Tag (private method). 

vot\_\-elemXMLEnd -- Build a string of the ending XML Tag (private method)

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em $\ast$e}]A pointer to an \hyperlink{structElement}{Element} \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A string that contains the ending XML tag for e \end{Desc}
\hypertarget{votElement_8c_c247ed61c78db54860fbbf80385f3088}{
\index{votElement.c@{votElement.c}!vot\_\-eType@{vot\_\-eType}}
\index{vot\_\-eType@{vot\_\-eType}!votElement.c@{votElement.c}}
\subsubsection[{vot\_\-eType}]{\setlength{\rightskip}{0pt plus 5cm}int vot\_\-eType (char $\ast$ {\em name})}}
\label{votElement_8c_c247ed61c78db54860fbbf80385f3088}


Get the integer value (ID) of the name (private method). 

vot\_\-eType -- Get the integer value (ID) of the name (private method).

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]Name of the desired type \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]An integer corresponding to the type of the element \end{Desc}
\hypertarget{votElement_8c_744db49ce83f6ed1d76b7aa4eacd9dd9}{
\index{votElement.c@{votElement.c}!vot\_\-newElem@{vot\_\-newElem}}
\index{vot\_\-newElem@{vot\_\-newElem}!votElement.c@{votElement.c}}
\subsubsection[{vot\_\-newElem}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Element} $\ast$ vot\_\-newElem (unsigned int {\em type})}}
\label{votElement_8c_744db49ce83f6ed1d76b7aa4eacd9dd9}


Allocate a new structure of the given type (private method). 

vot\_\-newElem -- Allocate a new structure of the given type (private method)

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em type}]An integer that defines the type of \hyperlink{structElement}{Element} \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]An new \hyperlink{structElement}{Element} structure \end{Desc}


\subsection{Variable Documentation}
\hypertarget{votElement_8c_3e26a3122260ebbdfd356ff07e308159}{
\index{votElement.c@{votElement.c}!elemAttrs@{elemAttrs}}
\index{elemAttrs@{elemAttrs}!votElement.c@{votElement.c}}
\subsubsection[{elemAttrs}]{\setlength{\rightskip}{0pt plus 5cm}struct \{ ... \}   {\bf elemAttrs}\mbox{[}$\,$\mbox{]}}}
\label{votElement_8c_3e26a3122260ebbdfd356ff07e308159}


Definition of Required and Optional attributes of VOTable elements. \hypertarget{votElement_8c_5ac083a645d964373f022d03df4849c8}{
\index{votElement.c@{votElement.c}!name@{name}}
\index{name@{name}!votElement.c@{votElement.c}}
\subsubsection[{name}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ {\bf name}}}
\label{votElement_8c_5ac083a645d964373f022d03df4849c8}


element type \hypertarget{votElement_8c_64794c1524dec8e3f98417a50ad08224}{
\index{votElement.c@{votElement.c}!opt@{opt}}
\index{opt@{opt}!votElement.c@{votElement.c}}
\subsubsection[{opt}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ {\bf opt}}}
\label{votElement_8c_64794c1524dec8e3f98417a50ad08224}


required attrs \hypertarget{votElement_8c_b47351fd475e3902c6d5da9e09474834}{
\index{votElement.c@{votElement.c}!req@{req}}
\index{req@{req}!votElement.c@{votElement.c}}
\subsubsection[{req}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ {\bf req}}}
\label{votElement_8c_b47351fd475e3902c6d5da9e09474834}


element type 