Java Code Examples for org.xml.sax.Attributes#getType()
The following examples show how to use
org.xml.sax.Attributes#getType() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AttributesImpl.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Copy an entire Attributes object. * * <p>It may be more efficient to reuse an existing object * rather than constantly allocating new ones.</p> * * @param atts The attributes to copy. */ public void setAttributes (Attributes atts) { clear(); length = atts.getLength(); if (length > 0) { data = new String[length*5]; for (int i = 0; i < length; i++) { data[i*5] = atts.getURI(i); data[i*5+1] = atts.getLocalName(i); data[i*5+2] = atts.getQName(i); data[i*5+3] = atts.getType(i); data[i*5+4] = atts.getValue(i); } } }
Example 2
Source File: AttributesImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Copy an entire Attributes object. * * <p>It may be more efficient to reuse an existing object * rather than constantly allocating new ones.</p> * * @param atts The attributes to copy. */ public void setAttributes (Attributes atts) { clear(); length = atts.getLength(); if (length > 0) { data = new String[length*5]; for (int i = 0; i < length; i++) { data[i*5] = atts.getURI(i); data[i*5+1] = atts.getLocalName(i); data[i*5+2] = atts.getQName(i); data[i*5+3] = atts.getType(i); data[i*5+4] = atts.getValue(i); } } }
Example 3
Source File: AttributesImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Copy an entire Attributes object. * * <p>It may be more efficient to reuse an existing object * rather than constantly allocating new ones.</p> * * @param atts The attributes to copy. */ public void setAttributes (Attributes atts) { clear(); length = atts.getLength(); if (length > 0) { data = new String[length*5]; for (int i = 0; i < length; i++) { data[i*5] = atts.getURI(i); data[i*5+1] = atts.getLocalName(i); data[i*5+2] = atts.getQName(i); data[i*5+3] = atts.getType(i); data[i*5+4] = atts.getValue(i); } } }
Example 4
Source File: AttributesImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Copy an entire Attributes object. * * <p>It may be more efficient to reuse an existing object * rather than constantly allocating new ones.</p> * * @param atts The attributes to copy. */ public void setAttributes (Attributes atts) { clear(); length = atts.getLength(); if (length > 0) { data = new String[length*5]; for (int i = 0; i < length; i++) { data[i*5] = atts.getURI(i); data[i*5+1] = atts.getLocalName(i); data[i*5+2] = atts.getQName(i); data[i*5+3] = atts.getType(i); data[i*5+4] = atts.getValue(i); } } }
Example 5
Source File: EncodingAlgorithmAttributesImpl.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Copy an entire Attributes object. * * @param atts The attributes to copy. */ public void setAttributes(Attributes atts) { _length = atts.getLength(); if (_length > 0) { if (_length >= _algorithmData.length) { resizeNoCopy(); } int index = 0; for (int i = 0; i < _length; i++) { _data[index++] = atts.getURI(i); _data[index++] = atts.getLocalName(i); _data[index++] = atts.getQName(i); _data[index++] = atts.getType(i); _data[index++] = atts.getValue(i); index++; _toIndex[i] = false; _alphabets[i] = null; } } }
Example 6
Source File: EncodingAlgorithmAttributesImpl.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Copy an entire Attributes object. * * @param atts The attributes to copy. */ public void setAttributes(Attributes atts) { _length = atts.getLength(); if (_length > 0) { if (_length >= _algorithmData.length) { resizeNoCopy(); } int index = 0; for (int i = 0; i < _length; i++) { _data[index++] = atts.getURI(i); _data[index++] = atts.getLocalName(i); _data[index++] = atts.getQName(i); _data[index++] = atts.getType(i); _data[index++] = atts.getValue(i); index++; _toIndex[i] = false; _alphabets[i] = null; } } }
Example 7
Source File: EncodingAlgorithmAttributesImpl.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Copy an entire Attributes object. * * @param atts The attributes to copy. */ public void setAttributes(Attributes atts) { _length = atts.getLength(); if (_length > 0) { if (_length >= _algorithmData.length) { resizeNoCopy(); } int index = 0; for (int i = 0; i < _length; i++) { _data[index++] = atts.getURI(i); _data[index++] = atts.getLocalName(i); _data[index++] = atts.getQName(i); _data[index++] = atts.getType(i); _data[index++] = atts.getValue(i); index++; _toIndex[i] = false; _alphabets[i] = null; } } }
Example 8
Source File: EncodingAlgorithmAttributesImpl.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Copy an entire Attributes object. * * @param atts The attributes to copy. */ public void setAttributes(Attributes atts) { _length = atts.getLength(); if (_length > 0) { if (_length >= _algorithmData.length) { resizeNoCopy(); } int index = 0; for (int i = 0; i < _length; i++) { _data[index++] = atts.getURI(i); _data[index++] = atts.getLocalName(i); _data[index++] = atts.getQName(i); _data[index++] = atts.getType(i); _data[index++] = atts.getValue(i); index++; _toIndex[i] = false; _alphabets[i] = null; } } }
Example 9
Source File: AttributesImpl.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Copy an entire Attributes object. * * <p>It may be more efficient to reuse an existing object * rather than constantly allocating new ones.</p> * * @param atts The attributes to copy. */ public void setAttributes (Attributes atts) { clear(); length = atts.getLength(); if (length > 0) { data = new String[length*5]; for (int i = 0; i < length; i++) { data[i*5] = atts.getURI(i); data[i*5+1] = atts.getLocalName(i); data[i*5+2] = atts.getQName(i); data[i*5+3] = atts.getType(i); data[i*5+4] = atts.getValue(i); } } }
Example 10
Source File: AttributesImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Copy an entire Attributes object. * * <p>It may be more efficient to reuse an existing object * rather than constantly allocating new ones.</p> * * @param atts The attributes to copy. */ public void setAttributes (Attributes atts) { clear(); length = atts.getLength(); data = new String[length*5]; for (int i = 0; i < length; i++) { data[i*5] = atts.getURI(i); data[i*5+1] = atts.getLocalName(i); data[i*5+2] = atts.getQName(i); data[i*5+3] = atts.getType(i); data[i*5+4] = atts.getValue(i); } }
Example 11
Source File: SchemaContentHandler.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private void fillXMLAttributes(Attributes atts) { fAttributes.removeAllAttributes(); final int attrCount = atts.getLength(); for (int i = 0; i < attrCount; ++i) { fillQName(fAttributeQName, atts.getURI(i), atts.getLocalName(i), atts.getQName(i)); String type = atts.getType(i); fAttributes.addAttributeNS(fAttributeQName, (type != null) ? type : XMLSymbols.fCDATASymbol, atts.getValue(i)); fAttributes.setSpecified(i, true); } }
Example 12
Source File: AttributesImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Copy an entire Attributes object. * * <p>It may be more efficient to reuse an existing object * rather than constantly allocating new ones.</p> * * @param atts The attributes to copy. */ public void setAttributes (Attributes atts) { clear(); length = atts.getLength(); data = new String[length*5]; for (int i = 0; i < length; i++) { data[i*5] = atts.getURI(i); data[i*5+1] = atts.getLocalName(i); data[i*5+2] = atts.getQName(i); data[i*5+3] = atts.getType(i); data[i*5+4] = atts.getValue(i); } }
Example 13
Source File: SchemaContentHandler.java From Bytecoder with Apache License 2.0 | 5 votes |
private void fillXMLAttributes(Attributes atts) { fAttributes.removeAllAttributes(); final int attrCount = atts.getLength(); for (int i = 0; i < attrCount; ++i) { fillQName(fAttributeQName, atts.getURI(i), atts.getLocalName(i), atts.getQName(i)); String type = atts.getType(i); fAttributes.addAttributeNS(fAttributeQName, (type != null) ? type : XMLSymbols.fCDATASymbol, atts.getValue(i)); fAttributes.setSpecified(i, true); } }
Example 14
Source File: AttributesImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Copy an entire Attributes object. * * <p>It may be more efficient to reuse an existing object * rather than constantly allocating new ones.</p> * * @param atts The attributes to copy. */ public void setAttributes (Attributes atts) { clear(); length = atts.getLength(); data = new String[length*5]; for (int i = 0; i < length; i++) { data[i*5] = atts.getURI(i); data[i*5+1] = atts.getLocalName(i); data[i*5+2] = atts.getQName(i); data[i*5+3] = atts.getType(i); data[i*5+4] = atts.getValue(i); } }
Example 15
Source File: AttributesImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Copy an entire Attributes object. * * <p>It may be more efficient to reuse an existing object * rather than constantly allocating new ones.</p> * * @param atts The attributes to copy. */ public void setAttributes (Attributes atts) { clear(); length = atts.getLength(); data = new String[length*5]; for (int i = 0; i < length; i++) { data[i*5] = atts.getURI(i); data[i*5+1] = atts.getLocalName(i); data[i*5+2] = atts.getQName(i); data[i*5+3] = atts.getType(i); data[i*5+4] = atts.getValue(i); } }
Example 16
Source File: SchemaContentHandler.java From hottub with GNU General Public License v2.0 | 5 votes |
private void fillXMLAttributes(Attributes atts) { fAttributes.removeAllAttributes(); final int attrCount = atts.getLength(); for (int i = 0; i < attrCount; ++i) { fillQName(fAttributeQName, atts.getURI(i), atts.getLocalName(i), atts.getQName(i)); String type = atts.getType(i); fAttributes.addAttributeNS(fAttributeQName, (type != null) ? type : XMLSymbols.fCDATASymbol, atts.getValue(i)); fAttributes.setSpecified(i, true); } }
Example 17
Source File: SchemaContentHandler.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private void fillXMLAttributes(Attributes atts) { fAttributes.removeAllAttributes(); final int attrCount = atts.getLength(); for (int i = 0; i < attrCount; ++i) { fillQName(fAttributeQName, atts.getURI(i), atts.getLocalName(i), atts.getQName(i)); String type = atts.getType(i); fAttributes.addAttributeNS(fAttributeQName, (type != null) ? type : XMLSymbols.fCDATASymbol, atts.getValue(i)); fAttributes.setSpecified(i, true); } }
Example 18
Source File: AttributesImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Copy an entire Attributes object. * * <p>It may be more efficient to reuse an existing object * rather than constantly allocating new ones.</p> * * @param atts The attributes to copy. */ public void setAttributes (Attributes atts) { clear(); length = atts.getLength(); data = new String[length*5]; for (int i = 0; i < length; i++) { data[i*5] = atts.getURI(i); data[i*5+1] = atts.getLocalName(i); data[i*5+2] = atts.getQName(i); data[i*5+3] = atts.getType(i); data[i*5+4] = atts.getValue(i); } }
Example 19
Source File: AttributesImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Copy an entire Attributes object. * * <p>It may be more efficient to reuse an existing object * rather than constantly allocating new ones.</p> * * @param atts The attributes to copy. */ public void setAttributes (Attributes atts) { clear(); length = atts.getLength(); data = new String[length*5]; for (int i = 0; i < length; i++) { data[i*5] = atts.getURI(i); data[i*5+1] = atts.getLocalName(i); data[i*5+2] = atts.getQName(i); data[i*5+3] = atts.getType(i); data[i*5+4] = atts.getValue(i); } }
Example 20
Source File: ValidatorHandlerImpl.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** Adds an attribute to the XMLAttributes object. */ private void fillXMLAttribute(Attributes att, int index) { fillQName(fAttributeQName, att.getURI(index), att.getLocalName(index), att.getQName(index)); String type = att.getType(index); fAttributes.addAttributeNS(fAttributeQName, (type != null) ? type : XMLSymbols.fCDATASymbol, att.getValue(index)); }