iTextSharp.text.xml.XmlPeer.GetAttributes C# (CSharp) Method

GetAttributes() public method

Gets the list of attributes of the peer.
public GetAttributes ( Hashtable attrs ) : Properties
attrs System.Collections.Hashtable
return System.util.Properties
		public virtual Properties GetAttributes(Hashtable attrs) {
			Properties attributes = new Properties();
			attributes.AddAll(attributeValues);
			if (defaultContent != null) {
				attributes.Add(ElementTags.ITEXT, defaultContent);
			}
			if (attrs != null) {
				foreach (string key in attrs.Keys) {
					attributes.Add(GetName(key), (string)attrs[key]);
				}
			}
			return attributes;
		}
    

Usage Example

コード例 #1
0
 /// <summary>
 /// This method gets called when a start tag is encountered.
 /// </summary>
 /// <param name="uri"></param>
 /// <param name="lname"></param>
 /// <param name="name">the name of the tag that is encountered</param>
 /// <param name="attrs">the list of attributes</param>
 public override void StartElement(String uri, String lname, String name, Hashtable attrs)
 {
     if (myTags.ContainsKey(name))
     {
         XmlPeer peer = (XmlPeer)myTags[name];
         HandleStartingTags(peer.Tag, peer.GetAttributes(attrs));
     }
     else
     {
         Properties attributes = new Properties();
         if (attrs != null)
         {
             foreach (string key in attrs.Keys)
             {
                 attributes.Add(key, (string)attrs[key]);
             }
         }
         HandleStartingTags(name, attributes);
     }
 }
All Usage Examples Of iTextSharp.text.xml.XmlPeer::GetAttributes