AutoWikiBrowser.Plugins.Kingbotk.PluginManager.XMLReadString C# (CSharp) Method

XMLReadString() static private method

static private XMLReadString ( XmlTextReader reader, string param, string existingValue ) : string
reader System.Xml.XmlTextReader
param string
existingValue string
return string
        internal static string XMLReadString(XmlTextReader reader, string param, string existingValue)
        {
            if (reader.MoveToAttribute(param))
                return reader.Value.Trim();
            return existingValue;
        }

Usage Example

Example #1
0
        // XML:
        internal virtual void ReadXMLRedirects(XmlTextReader reader)
        {
            // For compiled template plugins, a Redirect string read in from XML is for backup use only if getting from WP fails
            // Generic templates already support AlternateNames property so will override this
            string redirs = PluginManager.XMLReadString(reader, RedirectsParm, LastKnownGoodRedirects);

            if (!string.IsNullOrEmpty(redirs))
                LastKnownGoodRedirects = redirs;
        }