/** Fills in a QName object. */ private void fillQName(QName toFill, javax.xml.namespace.QName toCopy) { fillQName(toFill, toCopy.getNamespaceURI(), toCopy.getLocalPart(), toCopy.getPrefix()); }
private void fillXMLAttributes(XMLStreamReader input) { fAttributes.removeAllAttributes(); final int len = input.getAttributeCount(); for (int i = 0; i < len; ++i) { fillQName(fAttributeQName, input.getAttributeNamespace(i), input.getAttributeLocalName(i), input.getAttributePrefix(i)); String type = input.getAttributeType(i); fAttributes.addAttributeNS(fAttributeQName, (type != null) ? type : XMLSymbols.fCDATASymbol, input.getAttributeValue(i)); fAttributes.setSpecified(i, input.isAttributeSpecified(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()); } }
++fDepth; StartElement start = currentEvent.asStartElement(); fillQName(fElementQName, start.getName()); fLocationWrapper.setLocation(start.getLocation()); fNamespaceContext.setNamespaceContext(start.getNamespaceContext()); case XMLStreamConstants.END_ELEMENT: EndElement end = currentEvent.asEndElement(); fillQName(fElementQName, end.getName()); fillDeclaredPrefixes(end); fLocationWrapper.setLocation(end.getLocation());
fLocationWrapper.setLocation(input.getLocation()); fNamespaceContext.setNamespaceContext(input.getNamespaceContext()); fillQName(fElementQName, input.getNamespaceURI(), input.getLocalName(), input.getPrefix()); fillXMLAttributes(input); fLocationWrapper.setLocation(input.getLocation()); fNamespaceContext.setNamespaceContext(input.getNamespaceContext()); fillQName(fElementQName, input.getNamespaceURI(), input.getLocalName(), input.getPrefix()); fillDeclaredPrefixes(input);