xrootd
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
XrdXmlRdrXml2 Class Reference

#include <XrdXmlRdrXml2.hh>

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

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 ()
 
- Public Member Functions inherited from XrdXmlReader
 XrdXmlReader ()
 Constructor & Destructor.
 
virtual ~XrdXmlReader ()
 

Static Public Member Functions

static bool Init ()
 
- Static Public Member Functions inherited from XrdXmlReader
static XrdXmlReaderGetReader (const char *fname, const char *enc=0, const char *impl=0)
 
static bool Init (const char *impl=0)
 

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::XrdXmlRdrXml2 ( bool &  aOK,
const char *  fname,
const char *  enc = 0 
)

Constructor & Destructor.

◆ ~XrdXmlRdrXml2()

virtual XrdXmlRdrXml2::~XrdXmlRdrXml2 ( )
virtual

Member Function Documentation

◆ Debug()

void XrdXmlRdrXml2::Debug ( const char *  ,
const char *  ,
char *  ,
const char *  ,
int   
)
private

◆ Free()

virtual void XrdXmlRdrXml2::Free ( void *  strP)
virtual

◆ GetAttributes()

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
anamePointer to an array of attribute names whose values are to be returned. The last entry in the array must be nil.
avalPointer 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.

◆ GetElement()

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

Find an XML tag element.

Parameters
enamePointer 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.
reqdWhen 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.

◆ GetError()

virtual const char * XrdXmlRdrXml2::GetError ( int &  ecode)
inlinevirtual

Get the description of the last error encountered.

Parameters
ecodeThe 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.

◆ GetName()

char * XrdXmlRdrXml2::GetName ( )
private

◆ GetText()

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
enamePointer to the corresponding tag name.
reqdWhen 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.

◆ Init()

static bool XrdXmlRdrXml2::Init ( )
static

Member Data Documentation

◆ debug

bool XrdXmlRdrXml2::debug
private

◆ doDup

bool XrdXmlRdrXml2::doDup
private

◆ eCode

int XrdXmlRdrXml2::eCode
private

Referenced by GetError().

◆ encType

const char* XrdXmlRdrXml2::encType
private

◆ eText

char XrdXmlRdrXml2::eText[250]
private

Referenced by GetError().

◆ reader

_xmlTextReader* XrdXmlRdrXml2::reader
private

The documentation for this class was generated from the following file: