All Downloads are FREE. Search and download functionalities are using the official Maven repository.

flash.XMLWriter.as Maven / Gradle / Ivy

There is a newer version: 3.0.0-rc1
Show newest version
package io.swagger.common
{
	public class XMLWriter
	{
		public var xml:XML;
		
		public function XMLWriter()
		{
			xml=;
		}
		
		public function reset():void {
			xml=new XML();
		}
		
		public function addProperty(propertyName:String, propertyValue:String):XML {
			var xmlProperty:XML=
			xmlProperty.setName(propertyName);
			xmlProperty.appendChild(propertyValue);
			xml.appendChild(xmlProperty);
			return xmlProperty;		
		}
		
		public function addAttribute(propertyName:String, attribute:String, attributeValue:String):void {
			xml.elements(propertyName)[0].@[attribute]=attributeValue;
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy