本文整理了Java中org.xml.sax.helpers.XMLFilterImpl.startElement()
方法的一些代码示例,展示了XMLFilterImpl.startElement()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLFilterImpl.startElement()
方法的具体详情如下:
包路径:org.xml.sax.helpers.XMLFilterImpl
类名称:XMLFilterImpl
方法名:startElement
[英]Filter a start element event.
[中]筛选开始元素事件。
代码示例来源:origin: jenkinsci/jenkins
@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);
}
代码示例来源:origin: apache/geode
/**
* 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);
}
代码示例来源:origin: igniterealtime/Openfire
@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);
}
}
代码示例来源:origin: com.sun.xml.bind/jaxb-impl
super.startElement(uri, localName, qName, atts);
startTagIsClosed = false;
} catch( IOException e ) {
代码示例来源:origin: mulesoft/mule
@Override
public void startElement(String arg0, String arg1, String arg2, Attributes arg3) throws SAXException {
super.startElement(this.usedNamespaceUri, arg1, arg2, arg3);
}
代码示例来源:origin: jamesagnew/hapi-fhir
@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));
}
代码示例来源:origin: jamesagnew/hapi-fhir
@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));
}
代码示例来源:origin: jamesagnew/hapi-fhir
@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));
}
代码示例来源:origin: org.jdom/jdom
/**
* <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);
}
代码示例来源:origin: org.dom4j/dom4j
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);
}
}
代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime
super.startElement(uri, localName, qName, atts);
startTagIsClosed = false;
} catch( IOException e ) {
代码示例来源:origin: xml-resolver/xml-resolver
/** 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);
}
代码示例来源:origin: com.sun.xml.ws/jaxws-tools
public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
throws SAXException {
inStart = true;
super.startElement(namespaceURI, localName, qName, atts);
}
代码示例来源:origin: org.ops4j.pax.web/pax-web-extender-war
@Override
public void startElement(String uri, String localName, String qName, Attributes atts)
throws SAXException {
super.startElement(namespaceUri, localName, qName, atts);
}
代码示例来源:origin: apache/karaf
@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);
}
代码示例来源:origin: com.sun.xml.ws/jaxws-rt
@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);
}
代码示例来源:origin: info.magnolia/magnolia-core
@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);
}
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
@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);
}
代码示例来源:origin: com.sun.xml.ws/jaxws-tools
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;
}
代码示例来源:origin: org.jpmml/pmml-model
@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);
}
内容来源于网络,如有侵权,请联系作者删除!