Logo Search packages:      
Sourcecode: xulrunner version File versions

nsresult nsGenericElement::GetAttrNameAt ( PRUint32  aIndex,
PRInt32 *  aNameSpaceID,
nsIAtom **  aName,
nsIAtom **  aPrefix 
) const [virtual, inherited]

Get the namespace / name / prefix of a given attribute.

aIndex the index of the attribute name
aNameSpace the name space ID of the attribute name [OUT]
aName the attribute name [OUT]
aPrefix the attribute prefix [OUT]

Implements nsIContent.

Definition at line 4102 of file nsGenericElement.cpp.

References nsGenericElement::mAttrsAndChildren.

Referenced by nsGenericHTMLElement::CopyInnerTo().

  const nsAttrName* name = mAttrsAndChildren.GetSafeAttrNameAt(aIndex);
  if (name) {
    *aNameSpaceID = name->NamespaceID();
    NS_ADDREF(*aName = name->LocalName());
    NS_IF_ADDREF(*aPrefix = name->GetPrefix());

    return NS_OK;

  *aNameSpaceID = kNameSpaceID_None;
  *aName = nsnull;
  *aPrefix = nsnull;


Generated by  Doxygen 1.6.0   Back to index