iTextSharp.text.xml.XmlPeer.AddAlias C# (CSharp) Метод

AddAlias() публичный Метод

Sets an alias for an attribute.
public AddAlias ( String name, String alias ) : void
name String the iText tagname
alias String the custom tagname
Результат void
		public virtual void AddAlias(String name, String alias) {
			attributeAliases.Add(alias, name);
		}
    

Usage Example

Пример #1
0
            /// <summary>
            /// This method gets called when a start tag is encountered.
            /// </summary>
            /// <param name="tag">the name of the tag that is encountered</param>
            /// <param name="lname"></param>
            /// <param name="n"></param>
            /// <param name="attrs">the list of attributes</param>
            public override void StartElement(String tag, String lname, String n, Hashtable attrs)
            {
                String name  = (string)attrs[NAME];
                String alias = (string)attrs[ALIAS];
                String value = (string)attrs[VALUE];

                if (name != null)
                {
                    if (TAG.Equals(lname))
                    {
                        currentPeer = new XmlPeer(name, alias);
                    }
                    else if (ATTRIBUTE.Equals(lname))
                    {
                        if (alias != null)
                        {
                            currentPeer.AddAlias(name, alias);
                        }
                        if (value != null)
                        {
                            currentPeer.AddValue(name, value);
                        }
                    }
                }
                value = (string)attrs[CONTENT];
                if (value != null)
                {
                    currentPeer.Content = value;
                }
            }
All Usage Examples Of iTextSharp.text.xml.XmlPeer::AddAlias