XrdXmlRdrXml2 Class Reference

#include <XrdXmlRdrXml2.hh>

Inheritance diagram for XrdXmlRdrXml2:
Inheritance graph
[legend]
Collaboration diagram for XrdXmlRdrXml2:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void Free (void *strP)
virtual bool GetAttributes (const char **aname, char **aval)
virtual int GetElement (const char **ename, bool reqd=false)
virtual const char * GetError (int &ecode)
virtual char * GetText (const char *ename, bool reqd=false)
 XrdXmlRdrXml2 (bool &aOK, const char *fname, const char *enc=0)
 Constructor & Destructor.
virtual ~XrdXmlRdrXml2 ()

Static Public Member Functions

static bool Init ()

Private Member Functions

void Debug (const char *, const char *, char *, const char *, int)
char * GetName ()

Private Attributes

_xmlTextReader * reader
const char * encType
int eCode
bool doDup
bool debug
char eText [250]

Constructor & Destructor Documentation

XrdXmlRdrXml2::XrdXmlRdrXml2 ( bool &  aOK,
const char *  fname,
const char *  enc = 0 
)

Constructor & Destructor.

virtual XrdXmlRdrXml2::~XrdXmlRdrXml2 (  )  [virtual]

Member Function Documentation

void XrdXmlRdrXml2::Debug ( const char *  ,
const char *  ,
char *  ,
const char *  ,
int   
) [private]
virtual void XrdXmlRdrXml2::Free ( void *  strP  )  [virtual]
virtual bool XrdXmlRdrXml2::GetAttributes ( const char **  aname,
char **  aval 
) [virtual]

Get attributes from an XML tag. GetAttributes() should only be called after a successful GetElement() call.

Parameters:
aname Pointer to an array of attribute names whose values are to be returned. The last entry in the array must be nil.
aval Pointer to an array where the corresponding attribute values are to be placed in 1-to-1 correspondence. The values must be freed using free().
Returns:
true One or more attributes have been returned. false No specified attributes were found.

Implements XrdXmlReader.

virtual int XrdXmlRdrXml2::GetElement ( const char **  ename,
bool  reqd = false 
) [virtual]

Find an XML tag element.

Parameters:
ename Pointer to an array of tag names any of which should be searched for. The last entry in the array must be nil. The first element of the array should contain the name of the context tag. Elements are searched only within the scope of that tag. When searching for the first desired tag, use a null string to indicate document scope.
reqd When true one of the tag elements listed in ename must be found otherwise an error is generated.
Returns:
=0 No specified tag was found. Note that this corresponds to encountering the tag present in ename[0], i.e. scope end. >0 A tag was found, the return value is the index into ename that corresponds to the tag's name.

Implements XrdXmlReader.

virtual const char* XrdXmlRdrXml2::GetError ( int &  ecode  )  [inline, virtual]

Get the description of the last error encountered.

Parameters:
ecode The error code associated with the error.
Returns:
Pointer to text describing the error. The text may be destroyed on a subsequent call to any other method. Otherwise it is stable. A nil pointer indicates that no error is present.

Implements XrdXmlReader.

References eCode, and eText.

char* XrdXmlRdrXml2::GetName (  )  [private]
virtual char* XrdXmlRdrXml2::GetText ( const char *  ename,
bool  reqd = false 
) [virtual]

Get the text portion of an XML tag element. GetText() should only be called after a successful call to GetElement() with a possibly intervening call to GetAttributes().

Parameters:
ename Pointer to the corresponding tag name.
reqd When true text must exist and not be null. Otherwise, an error is generated if the text is missing or null.
Returns:
=0 No text found.
!0 Pointer to the tag's text field. It must be free using free().

Implements XrdXmlReader.

static bool XrdXmlRdrXml2::Init (  )  [static]

Member Data Documentation

bool XrdXmlRdrXml2::debug [private]
bool XrdXmlRdrXml2::doDup [private]
int XrdXmlRdrXml2::eCode [private]

Referenced by GetError().

const char* XrdXmlRdrXml2::encType [private]
char XrdXmlRdrXml2::eText[250] [private]

Referenced by GetError().

_xmlTextReader* XrdXmlRdrXml2::reader [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 2 Oct 2019 for xrootd by  doxygen 1.6.1