public void serializeAttributes(BeanT bean, XMLSerializer target) throws SAXException, IOException, XMLStreamException { for (AttributeProperty<BeanT> p : attributeProperties) try { if (retainPropertyInfo) { final Property parentProperty = target.getCurrentProperty(); target.currentProperty.set(p); p.serializeAttributes(bean, target); target.currentProperty.set(parentProperty); } else { p.serializeAttributes(bean, target); } if (p.attName.equals(WellKnownNamespace.XML_SCHEMA_INSTANCE, "nil")) { isNilIncluded = true; } } catch (AccessorException e) { target.reportError(null, e); } try { if (inheritedAttWildcard != null) { Map<QName, String> map = inheritedAttWildcard.get(bean); target.attWildcardAsAttributes(map, null); } } catch (AccessorException e) { target.reportError(null, e); } }
public void serializeURIs(BeanT bean, XMLSerializer target) throws SAXException { try { if (retainPropertyInfo) { final Property parentProperty = target.getCurrentProperty(); for (Property<BeanT> p : uriProperties) { target.currentProperty.set(p); p.serializeURIs(bean, target); } target.currentProperty.set(parentProperty); } else { for (Property<BeanT> p : uriProperties) { p.serializeURIs(bean, target); } } if (inheritedAttWildcard != null) { Map<QName, String> map = inheritedAttWildcard.get(bean); target.attWildcardAsURIs(map, null); } } catch (AccessorException e) { target.reportError(null, e); } }