@Override public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException { String tagName = localName.toUpperCase(Locale.ENGLISH); // make sure that this tag occurs in the proper context if(!elements.peek().isAllowed(tagName)) throw new SAXException(tagName+" is not allowed inside "+tagNames.peek()); Checker next = CHECKERS.get(tagName); if(next==null) next = ALL_ALLOWED; elements.push(next); tagNames.push(tagName); super.startElement(uri, localName, qName, atts); }
/** * be able to handle no namespace or older namespace */ @Override public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException { if ("".equals(uri) || CacheXml.GEMFIRE_NAMESPACE.equals(uri)) { uri = CacheXml.GEODE_NAMESPACE; } super.startElement(uri, localName, qName, atts); }
@Override public void startElement(String namespaceURI, String localName, String qName, Attributes attributes) throws SAXException { try { charactersAdded = false; writePrintln(); indent(); writer.write("<"); writer.write(qName); writeNamespaces(); writeAttributes( attributes ); writer.write(">"); ++indentLevel; lastOutputNodeType = Node.ELEMENT_NODE; super.startElement( namespaceURI, localName, qName, attributes ); } catch (IOException e) { handleException(e); } }
super.startElement(uri, localName, qName, atts); startTagIsClosed = false; } catch( IOException e ) {
@Override public void startElement(String arg0, String arg1, String arg2, Attributes arg3) throws SAXException { super.startElement(this.usedNamespaceUri, arg1, arg2, arg3); }
@Override public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException { super.startElement(uri, localName, qName, atts); // Keep snapshot of start location, // for later when end of element is found. locatorStack.push(new LocatorImpl(locator)); }
@Override public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException { super.startElement(uri, localName, qName, atts); // Keep snapshot of start location, // for later when end of element is found. locatorStack.push(new LocatorImpl(locator)); }
@Override public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException { super.startElement(uri, localName, qName, atts); // Keep snapshot of start location, // for later when end of element is found. locatorStack.push(new LocatorImpl(locator)); }
/** * <i>[SAX ContentHandler interface support]</i> Receives * notification of the beginning of an element. * <p> * This implementation ensures that startDocument() has been * called prior processing an element. * * @param nsURI the Namespace URI, or the empty string if * the element has no Namespace URI or if * Namespace processing is not being performed. * @param localName the local name (without prefix), or the * empty string if Namespace processing is * not being performed. * @param qName the qualified name (with prefix), or the * empty string if qualified names are not * available. * @param atts The attributes attached to the element. If * there are no attributes, it shall be an * empty Attributes object. * * @throws SAXException if any error occurred while creating * the document builder. */ @Override public void startElement(String nsURI, String localName, String qName, Attributes atts) throws SAXException { this.ensureInitialization(); super.startElement(nsURI, localName, qName, atts); }
public void startElement(String namespaceURI, String localName, String qName, Attributes attributes) throws SAXException { try { charsAdded = false; writePrintln(); indent(); writer.write("<"); writer.write(qName); writeNamespaces(); writeAttributes(attributes); writer.write(">"); ++indentLevel; lastOutputNodeType = Node.ELEMENT_NODE; lastElementClosed = false; super.startElement(namespaceURI, localName, qName, attributes); } catch (IOException e) { handleException(e); } }
super.startElement(uri, localName, qName, atts); startTagIsClosed = false; } catch( IOException e ) {
/** SAX ContentHandler API. * * <p>Captured here only to detect the end of the prolog so that * we can ignore subsequent oasis-xml-catalog PIs. Otherwise * the events are just passed through.</p> */ public void startElement (String uri, String localName, String qName, Attributes atts) throws SAXException { allowXMLCatalogPI = false; super.startElement(uri,localName,qName,atts); }
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException { inStart = true; super.startElement(namespaceURI, localName, qName, atts); }
@Override public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException { super.startElement(namespaceUri, localName, qName, atts); }
@Override public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException { if ("features".equals(localName)) { namespace = uri; } super.startElement(FeaturesNamespaces.URI_CURRENT, localName, qName, atts); }
@Override public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException { if (localName.equals("Address") && uri.equals(version.nsUri)) { inAddress = true; } super.startElement(uri,localName,qName,atts); }
@Override public void startElement(String uri, String localName, String name, Attributes atts) throws SAXException { if (name.equals("sv:property") && atts.getValue("sv:name").equals("jcr:mixinTypes")) { this.atts = new AttributesImpl(atts); inMixinTypes = true; values.clear(); } else if (inMixinTypes && name.equals("sv:value")) { inValue = true; } else { super.startElement(uri, localName, name, atts); } }
@Override public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException { String tagName = localName.toUpperCase(Locale.ENGLISH); // make sure that this tag occurs in the proper context if(!elements.peek().isAllowed(tagName)) throw new SAXException(tagName+" is not allowed inside "+tagNames.peek()); Checker next = CHECKERS.get(tagName); if(next==null) next = ALL_ALLOWED; elements.push(next); tagNames.push(tagName); super.startElement(uri, localName, qName, atts); }
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException { processPendingText(); super.startElement(uri, localName, qName, atts); state = AFTER_START_ELEMENT; bufLen = 0; }
@Override public void startElement(String namespaceURI, String localName, String qualifiedName, Attributes attributes) throws SAXException { if(isFilterable(namespaceURI)){ updateSource(namespaceURI); String filteredLocalName = filterLocalName(localName); String filteredQualifiedName = (("").equals(qualifiedName) ? "" : filteredLocalName); Attributes filteredAttributes = filterAttributes(localName, attributes); super.startElement(getNamespaceURI(), filteredLocalName, filteredQualifiedName, filteredAttributes); return; } super.startElement(namespaceURI, localName, qualifiedName, attributes); }