MXMLDtd Class Reference

class MXMLDtd

MXMLDtd is a mixin class. If User wants to derive from MXMLDtd class , then one should not derive from any other class at the same time. i.e A class can not derive from CBase at all using MXMLDtd.

Interface for DTD defintion classes. A class derived from this interface can be used by CMDXMLParser or CMDXMLComposer to check that the data conforms to a specific DTD.

Public Member Functions
TBool AreValidChildElementsL(const TDesC &, const CDesCArray &)
TBool CanElementHaveChildren(const TDesC &)
TInt IsValidAttributeForElementL(const TDesC &, const TDesC &, const TDesC &)
TBool IsValidElementL(const TDesC &)

Member Functions Documentation

AreValidChildElementsL(const TDesC &, const CDesCArray &)

TBool AreValidChildElementsL(const TDesC &aParentElement,
const CDesCArray &aChildElements
)const [pure virtual]

Tests if the parent/child relationship is valid in DTD.

leave
KErrNoMemory Out of memory

Parameters

const TDesC & aParentElementThe name of the parent element to be tested
const CDesCArray & aChildElementsAn array of child element names to be tested

CanElementHaveChildren(const TDesC &)

TBool CanElementHaveChildren(const TDesC &aElement)const [pure virtual]

Tests it is valid for a particular element to have children.

Parameters

const TDesC & aElementThe name of the element to be tested

IsValidAttributeForElementL(const TDesC &, const TDesC &, const TDesC &)

TInt IsValidAttributeForElementL(const TDesC &aElement,
const TDesC &aAttribute,
const TDesC &aAttributeValue
)const [pure virtual]

Tests if an attribute name and value is valid in DTD.

leave
KErrNoMemory Out of memory

Parameters

const TDesC & aElementThe element to which the attributes belong
const TDesC & aAttributeThe attribute to be tested
const TDesC & aAttributeValueThe attribute value to be tested

IsValidElementL(const TDesC &)

TBool IsValidElementL(const TDesC &aElement)const [pure virtual]

Tests if an element name is valid in the DTD.

leave
KErrNoMemory Out of memory

Parameters

const TDesC & aElementThe element name to be tested