System.Runtime.Remoting.MetadataServices.SdlParser.LookupAttribute C# (CSharp) Method

LookupAttribute() private method

private LookupAttribute ( String attrName, String attrNS, bool throwExp ) : String
attrName String
attrNS String
throwExp bool
return String
        private String LookupAttribute(String attrName, String attrNS, bool throwExp)
        {
            String value = s_emptyString;
            bool bPresent;
            if(attrNS != null)
                bPresent = _XMLReader.MoveToAttribute(attrName, attrNS);
            else
                bPresent = _XMLReader.MoveToAttribute(attrName);

            if(bPresent)
                value = Atomize(_XMLReader.Value.Trim());
            _XMLReader.MoveToElement();

            if((bPresent == false) && (throwExp == true))
            {
                throw new SUDSParserException(
                    String.Format(CoreChannel.GetResourceString("Remoting_Suds_AttributeNotFound"),
                        attrName));
            }
            Util.Log("SdlParser.LookupAttribute "+attrName+"="+value+", NS "+attrNS+", Exp "+throwExp);                                 
            return(value);
        }