@Override public String getAttributeType(int index) { return getAttribute(index).getDTDType(); }
@Override public String getAttributeType(int index) { return getAttribute(index).getDTDType(); }
namespace = ""; String type = attribute.getDTDType(); if (type == null) { type = "CDATA";
else qName = prefix + ':' + localName; String type = staxAttr.getDTDType(); String value = staxAttr.getValue();
namespace = ""; String type = attribute.getDTDType(); if (type == null) { type = "CDATA";
public String getAttributeType(int index) { return getAttribute(index).getDTDType(); }
else qName = prefix + ':' + localName; String type = staxAttr.getDTDType(); String value = staxAttr.getValue();
namespace = ""; String type = attribute.getDTDType(); if (type == null) { type = "CDATA";
private static final Element processElement(final JDOMFactory factory, final StartElement event) { final QName qname = event.getName(); final Element element = factory.element(qname.getLocalPart(), Namespace.getNamespace(qname.getPrefix(), qname.getNamespaceURI())); // Handle attributes for (final Iterator<?> it = event.getAttributes(); it.hasNext(); ) { final javax.xml.stream.events.Attribute att = (javax.xml.stream.events.Attribute)it.next(); final QName aqname = att.getName(); final Namespace attNs = Namespace.getNamespace(aqname.getPrefix(), aqname.getNamespaceURI()); factory.setAttribute(element, factory.attribute( aqname.getLocalPart(), att.getValue(), AttributeType.getAttributeType(att.getDTDType()), attNs)); } for (final Iterator<?> it = event.getNamespaces(); it.hasNext();) { final javax.xml.stream.events.Namespace ns = (javax.xml.stream.events.Namespace)it.next(); element.addNamespaceDeclaration(Namespace.getNamespace( ns.getPrefix(), ns.getNamespaceURI())); } return element; }
@Override public String getDTDType() { return delegate.getDTDType(); }
@Override public String getDTDType() { return this.attribute.getDTDType(); }
private static void printAttribute(Attribute a) { System.out.println("PREFIX: " + a.getName().getPrefix()); System.out.println("NAMESP: " + a.getName().getNamespaceURI()); System.out.println("NAME: " + a.getName().getLocalPart()); System.out.println("VALUE: " + a.getValue()); System.out.println("TYPE: " + a.getDTDType()); }
private Attributes convertAttrs(Iterator<Attribute> attributes) { AttributesImpl toReturn = new AttributesImpl(); while (attributes.hasNext()) { Attribute a = attributes.next(); toReturn.addAttribute(a.getName().getNamespaceURI(), a.getName().getLocalPart(), qnameToS(a.getName()), a.getDTDType(), a.getValue()); } return toReturn; }
private Attributes convertAttrs(Iterator<Attribute> attributes) { AttributesImpl toReturn = new AttributesImpl(); while (attributes.hasNext()) { Attribute a = attributes.next(); toReturn.addAttribute(a.getName().getNamespaceURI(), a.getName().getLocalPart(), qnameToS(a.getName()), a.getDTDType(), a.getValue()); } return toReturn; }
/** * Copy constructor. * * @param that The {@link Attribute} event to copy. */ public AttributeEvent(Attribute that) { super(that); this.specified = that.isSpecified(); this.name = that.getName(); this.value = that.getValue(); this.dtdType = that.getDTDType(); }
private Attributes convertAttrs(Iterator<Attribute> attributes) { AttributesImpl toReturn = new AttributesImpl(); while (attributes.hasNext()) { Attribute a = attributes.next(); toReturn.addAttribute(a.getName().getNamespaceURI(), a.getName().getLocalPart(), qnameToS(a.getName()), a.getDTDType(), a.getValue()); } return toReturn; }
private Attributes convertAttrs(Iterator<Attribute> attributes) { AttributesImpl toReturn = new AttributesImpl(); while (attributes.hasNext()) { Attribute a = attributes.next(); toReturn.addAttribute(a.getName().getNamespaceURI(), a.getName().getLocalPart(), qnameToS(a.getName()), a.getDTDType(), a.getValue()); } return toReturn; }
@Override public String getAttributeType(int index) { return getAttribute(index).getDTDType(); }
@Override public String getAttributeType(int i) { if (replay) { Attribute att = (Attribute) ((StartElementEventX) current).getAttributeList().get(i); return att.getDTDType(); } else { return super.getAttributeType(i); } }
private void fillXMLAttributes(StartElement event) { fAttributes.removeAllAttributes(); final Iterator attrs = event.getAttributes(); while (attrs.hasNext()) { Attribute attr = (Attribute) attrs.next(); fillQName(fAttributeQName, attr.getName()); String type = attr.getDTDType(); int idx = fAttributes.getLength(); fAttributes.addAttributeNS(fAttributeQName, (type != null) ? type : XMLSymbols.fCDATASymbol, attr.getValue()); fAttributes.setSpecified(idx, attr.isSpecified()); } }