// Return attribute key and value by attribute index, string version. public virtual bool getAttributeByIndex(int index, out XmlString key, out XmlString value) { string _key, _value; bool retVal = getAttributeByIndex(index, out _key, out _value); key = ( XmlString )_key; value = ( XmlString )_value; return(retVal); }
// Get attribute value of node. public override bool getAttr(string key, out XmlString value) { string v = ""; bool boHasAttribute = getAttr(key, out v); value = v; return(boHasAttribute); }
private string GetValue(string key) { CryXMLNodeIndex nFirst = _node( ).nFirstAttributeIndex; CryXMLNodeIndex nLast = nFirst + _node( ).nAttributeCount; for (CryXMLNodeIndex i = nFirst; i < nLast; i++) { XmlString attrKey = _string(m_pData.pAttributes[i].nKeyStringOffset); if (key == attrKey) { string attrValue = _string(m_pData.pAttributes[i].nValueStringOffset); return(attrValue); } } return(""); }
/// <summary> /// Gets attribute value of node. /// </summary> /// <param name="key">The attribute key</param> /// <param name="value">Out: the attribute value as XmlString</param> /// <returns>True if the attribute with key exists and the returned value is valid</returns> public abstract bool getAttr(string key, out XmlString value);