public void attWildcardAsAttributes(Map<QName,String> attributes, String fieldName) throws SAXException { if(attributes==null) return; for( Map.Entry<QName,String> e : attributes.entrySet() ) { QName n = e.getKey(); attribute(n.getNamespaceURI(),n.getLocalPart(),e.getValue()); } }
/** * Marshals one attribute. * * @see JaxBeanInfo#serializeAttributes(Object, XMLSerializer) */ public void serializeAttributes(BeanT o, XMLSerializer w) throws SAXException, AccessorException, IOException, XMLStreamException { CharSequence value = xacc.print(o); if(value!=null) w.attribute(attName,value.toString()); }
public void serializeAttributes(Object element, XMLSerializer target) throws SAXException { NamedNodeMap al = ((Element)element).getAttributes(); int len = al.getLength(); for( int i=0; i<len; i++ ) { Attr a = (Attr)al.item(i); // work defensively String uri = a.getNamespaceURI(); if(uri==null) uri=""; String local = a.getLocalName(); String name = a.getName(); if(local==null) local = name; if (uri.equals(WellKnownNamespace.XML_SCHEMA_INSTANCE) && ("nil".equals(local))) { isNilIncluded = true; } if(name.startsWith("xmlns")) continue;// DOM reports ns decls as attributes target.attribute(uri,local,a.getValue()); } }
/** * Short for the following call sequence: * * <pre> getNamespaceContext().declareNamespace(WellKnownNamespace.XML_SCHEMA_INSTANCE,"xsi",true); endNamespaceDecls(); attribute(WellKnownNamespace.XML_SCHEMA_INSTANCE,"nil","true"); endAttributes(); * </pre> */ public final void writeXsiNilTrue() throws SAXException, IOException, XMLStreamException { getNamespaceContext().declareNamespace(WellKnownNamespace.XML_SCHEMA_INSTANCE,"xsi",true); endNamespaceDecls(null); attribute(WellKnownNamespace.XML_SCHEMA_INSTANCE,"nil","true"); endAttributes(); }
serializer.attribute( atts.getURI(i), atts.getLocalName(i), atts.getValue(i));
public void attWildcardAsAttributes(Map<QName,String> attributes, String fieldName) throws SAXException { if(attributes==null) return; for( Map.Entry<QName,String> e : attributes.entrySet() ) { QName n = e.getKey(); attribute(n.getNamespaceURI(),n.getLocalPart(),e.getValue()); } }
/** * Marshals one attribute. * * @see JaxBeanInfo#serializeAttributes(Object, XMLSerializer) */ public void serializeAttributes(BeanT o, XMLSerializer w) throws SAXException, AccessorException, IOException, XMLStreamException { CharSequence value = xacc.print(o); if(value!=null) w.attribute(attName,value.toString()); }
public void serializeAttributes(Object element, XMLSerializer target) throws SAXException { NamedNodeMap al = ((Element)element).getAttributes(); int len = al.getLength(); for( int i=0; i<len; i++ ) { Attr a = (Attr)al.item(i); // work defensively String uri = a.getNamespaceURI(); if(uri==null) uri=""; String local = a.getLocalName(); String name = a.getName(); if(local==null) local = name; if (uri.equals(WellKnownNamespace.XML_SCHEMA_INSTANCE) && ("nil".equals(local))) { isNilIncluded = true; } if(name.startsWith("xmlns")) continue;// DOM reports ns decls as attributes target.attribute(uri,local,a.getValue()); } }
/** * Short for the following call sequence: * * <pre> getNamespaceContext().declareNamespace(WellKnownNamespace.XML_SCHEMA_INSTANCE,"xsi",true); endNamespaceDecls(); attribute(WellKnownNamespace.XML_SCHEMA_INSTANCE,"nil","true"); endAttributes(); * </pre> */ public final void writeXsiNilTrue() throws SAXException, IOException, XMLStreamException { getNamespaceContext().declareNamespace(WellKnownNamespace.XML_SCHEMA_INSTANCE,"xsi",true); endNamespaceDecls(null); attribute(WellKnownNamespace.XML_SCHEMA_INSTANCE,"nil","true"); endAttributes(); }
serializer.attribute( atts.getURI(i), atts.getLocalName(i), atts.getValue(i));
public void attWildcardAsAttributes(Map<QName,String> attributes, String fieldName) throws SAXException { if(attributes==null) return; for( Map.Entry<QName,String> e : attributes.entrySet() ) { QName n = e.getKey(); attribute(n.getNamespaceURI(),n.getLocalPart(),e.getValue()); } }
public void attWildcardAsAttributes(Map<QName,String> attributes, String fieldName) throws SAXException { if(attributes==null) return; for( Map.Entry<QName,String> e : attributes.entrySet() ) { QName n = e.getKey(); attribute(n.getNamespaceURI(),n.getLocalPart(),e.getValue()); } }
/** * Marshals one attribute. * * @see JaxBeanInfo#serializeAttributes(Object, XMLSerializer) */ public void serializeAttributes(BeanT o, XMLSerializer w) throws SAXException, AccessorException, IOException, XMLStreamException { CharSequence value = xacc.print(o); if(value!=null) w.attribute(attName,value.toString()); }
/** * Marshals one attribute. * * @see JaxBeanInfo#serializeAttributes(Object, XMLSerializer) */ public void serializeAttributes(BeanT o, XMLSerializer w) throws SAXException, AccessorException, IOException, XMLStreamException { CharSequence value = xacc.print(o); if(value!=null) w.attribute(attName,value.toString()); }
public void serializeAttributes(Object element, XMLSerializer target) throws SAXException { NamedNodeMap al = ((Element)element).getAttributes(); int len = al.getLength(); for( int i=0; i<len; i++ ) { Attr a = (Attr)al.item(i); // work defensively String uri = a.getNamespaceURI(); if(uri==null) uri=""; String local = a.getLocalName(); String name = a.getName(); if(local==null) local = name; if (uri.equals(WellKnownNamespace.XML_SCHEMA_INSTANCE) && ("nil".equals(local))) { isNilIncluded = true; } if(name.startsWith("xmlns")) continue;// DOM reports ns decls as attributes target.attribute(uri,local,a.getValue()); } }
public void serializeAttributes(Object element, XMLSerializer target) throws SAXException { NamedNodeMap al = ((Element)element).getAttributes(); int len = al.getLength(); for( int i=0; i<len; i++ ) { Attr a = (Attr)al.item(i); // work defensively String uri = a.getNamespaceURI(); if(uri==null) uri=""; String local = a.getLocalName(); String name = a.getName(); if(local==null) local = name; if (uri.equals(WellKnownNamespace.XML_SCHEMA_INSTANCE) && ("nil".equals(local))) { isNilIncluded = true; } if(name.startsWith("xmlns")) continue;// DOM reports ns decls as attributes target.attribute(uri,local,a.getValue()); } }
/** * Short for the following call sequence: * * <pre> getNamespaceContext().declareNamespace(WellKnownNamespace.XML_SCHEMA_INSTANCE,"xsi",true); endNamespaceDecls(); attribute(WellKnownNamespace.XML_SCHEMA_INSTANCE,"nil","true"); endAttributes(); * </pre> */ public final void writeXsiNilTrue() throws SAXException, IOException, XMLStreamException { getNamespaceContext().declareNamespace(WellKnownNamespace.XML_SCHEMA_INSTANCE,"xsi",true); endNamespaceDecls(null); attribute(WellKnownNamespace.XML_SCHEMA_INSTANCE,"nil","true"); endAttributes(); }
/** * Short for the following call sequence: * * <pre> getNamespaceContext().declareNamespace(WellKnownNamespace.XML_SCHEMA_INSTANCE,"xsi",true); endNamespaceDecls(); attribute(WellKnownNamespace.XML_SCHEMA_INSTANCE,"nil","true"); endAttributes(); * </pre> */ public final void writeXsiNilTrue() throws SAXException, IOException, XMLStreamException { getNamespaceContext().declareNamespace(WellKnownNamespace.XML_SCHEMA_INSTANCE,"xsi",true); endNamespaceDecls(null); attribute(WellKnownNamespace.XML_SCHEMA_INSTANCE,"nil","true"); endAttributes(); }