Code example for Element

Methods: setAttribute

0
	public static final String PROPERTY_TYPE_ATTRIBUTE = "type"; //$NON-NLS-1$
 
	@Override 
	public void toXML(IBookmarkProperty property, Element propertyElement, URI context)
	{ 
		propertyElement.setAttribute(PROPERTY_TYPE_ATTRIBUTE, property.getType());
		BookmarkPropertyFactory.exportProperty(property, propertyElement);
	} 
 
	@Override 
	public IBookmarkProperty fromXML(Element root, URI context)
	{ 
		return BookmarkPropertyFactory.createProperty(root.getAttribute(PROPERTY_TYPE_ATTRIBUTE), root);
	} 
 
}