public void writeAttribute(String nsURI, String localName, String value) throws XMLStreamException { // No need to set mAnyOutput, nor close the element if (!mStartElementOpen) { throwOutputError(ErrorConsts.WERR_ATTR_NO_ELEM); } doWriteAttr(localName, nsURI, findOrCreateAttrPrefix(null, nsURI, mCurrElem), value); }
public void writeAttribute(String prefix, String nsURI, String localName, String value) throws XMLStreamException { if (!mStartElementOpen) { throwOutputError(ErrorConsts.WERR_ATTR_NO_ELEM); } doWriteAttr(localName, nsURI, findOrCreateAttrPrefix(prefix, nsURI, mCurrElem), value); }
public void writeDefaultNamespace(String nsURI) throws XMLStreamException { /* 01-Sep-2006, TSa: The use case for calling this method is that * of caller may wanting to 'suggest' that * such a namespace should indeed be bound at this level. This * may be necessary for canonicalization, or for minimizing number * of binding declarations (all children need the ns, but root * itself not). */ if (!mStartElementOpen) { throwOutputError(ERR_NSDECL_WRONG_STATE); } /* ... We have one complication though: if the current element * uses default namespace, can not change it (attributes don't * matter -- they never use the default namespace, but either don't * belong to a namespace, or belong to one using explicit prefix) */ String prefix = mCurrElem.getPrefix(); if (prefix != null && prefix.length() > 0) { // ok, can change it mCurrElem.setDefaultNsUri(nsURI); doWriteDefaultNs(nsURI); } }
public void writeNamespace(String prefix, String nsURI) throws XMLStreamException { /* (see discussion in 'writeDefaultNamespace()' for details on * if and how this method may get called in repairing mode) */ if (prefix == null || prefix.length() == 0) { writeDefaultNamespace(nsURI); return; } if (!mStartElementOpen) { throwOutputError(ERR_NSDECL_WRONG_STATE); } /* 01-Sep-2006, TSa: Let's only add the declaration if the prefix * is as of yet unbound. If we have to re-bind things in future, * so be it -- for now, this should suffice (and if we have to * add re-binding, must verify that no attribute, nor element * itself, is using overridden prefix) */ int value = mCurrElem.isPrefixValid(prefix, nsURI, true); if (value == SimpleOutputElement.PREFIX_UNBOUND) { mCurrElem.addPrefix(prefix, nsURI); doWriteNamespace(prefix, nsURI); } }
@Override public void writeAttribute(String nsURI, String localName, String value) throws XMLStreamException { // No need to set mAnyOutput, nor close the element if (!mStartElementOpen) { throwOutputError(ErrorConsts.WERR_ATTR_NO_ELEM); } doWriteAttr(localName, nsURI, findOrCreateAttrPrefix(null, nsURI, mCurrElem), value); }
public void writeAttribute(String prefix, String nsURI, String localName, String value) throws XMLStreamException { if (!mStartElementOpen) { throwOutputError(ErrorConsts.WERR_ATTR_NO_ELEM); } doWriteAttr(localName, nsURI, findOrCreateAttrPrefix(prefix, nsURI, mCurrElem), value); }
public void writeAttribute(String prefix, String nsURI, String localName, String value) throws XMLStreamException { if (!mStartElementOpen) { throwOutputError(ErrorConsts.WERR_ATTR_NO_ELEM); } doWriteAttr(localName, nsURI, findOrCreateAttrPrefix(prefix, nsURI, mCurrElem), value); }
@Override public void writeAttribute(String nsURI, String localName, String value) throws XMLStreamException { // No need to set mAnyOutput, nor close the element if (!mStartElementOpen) { throwOutputError(ErrorConsts.WERR_ATTR_NO_ELEM); } doWriteAttr(localName, nsURI, findOrCreateAttrPrefix(null, nsURI, mCurrElem), value); }
public void writeAttribute(String nsURI, String localName, String value) throws XMLStreamException { // No need to set mAnyOutput, nor close the element if (!mStartElementOpen) { throwOutputError(ErrorConsts.WERR_ATTR_NO_ELEM); } doWriteAttr(localName, nsURI, findOrCreateAttrPrefix(null, nsURI, mCurrElem), value); }
public void writeAttribute(String nsURI, String localName, String value) throws XMLStreamException { // No need to set mAnyOutput, nor close the element if (!mStartElementOpen) { throwOutputError(ErrorConsts.WERR_ATTR_NO_ELEM); } doWriteAttr(localName, nsURI, findOrCreateAttrPrefix(null, nsURI, mCurrElem), value); }
public void writeAttribute(String prefix, String nsURI, String localName, String value) throws XMLStreamException { if (!mStartElementOpen) { throwOutputError(ErrorConsts.WERR_ATTR_NO_ELEM); } doWriteAttr(localName, nsURI, findOrCreateAttrPrefix(prefix, nsURI, mCurrElem), value); }
@Override public void writeAttribute(String nsURI, String localName, String value) throws XMLStreamException { // No need to set mAnyOutput, nor close the element if (!mStartElementOpen) { throwOutputError(ErrorConsts.WERR_ATTR_NO_ELEM); } doWriteAttr(localName, nsURI, findOrCreateAttrPrefix(null, nsURI, mCurrElem), value); }
public void writeAttribute(String nsURI, String localName, String value) throws XMLStreamException { // No need to set mAnyOutput, nor close the element if (!mStartElementOpen) { throwOutputError(ErrorConsts.WERR_ATTR_NO_ELEM); } doWriteAttr(localName, nsURI, findOrCreateAttrPrefix(null, nsURI, mCurrElem), value); }
public void writeAttribute(String prefix, String nsURI, String localName, String value) throws XMLStreamException { if (!mStartElementOpen) { throwOutputError(ErrorConsts.WERR_ATTR_NO_ELEM); } doWriteAttr(localName, nsURI, findOrCreateAttrPrefix(prefix, nsURI, mCurrElem), value); }
@Override public void writeAttribute(String prefix, String nsURI, String localName, String value) throws XMLStreamException { if (!mStartElementOpen) { throwOutputError(ErrorConsts.WERR_ATTR_NO_ELEM); } doWriteAttr(localName, nsURI, findOrCreateAttrPrefix(prefix, nsURI, mCurrElem), value); }
@Override public void writeAttribute(String prefix, String nsURI, String localName, String value) throws XMLStreamException { if (!mStartElementOpen) { throwOutputError(ErrorConsts.WERR_ATTR_NO_ELEM); } doWriteAttr(localName, nsURI, findOrCreateAttrPrefix(prefix, nsURI, mCurrElem), value); }
public void writeAttribute(String nsURI, String localName, String value) throws XMLStreamException { // No need to set mAnyOutput, nor close the element if (!mStartElementOpen) { throwOutputError(ErrorConsts.WERR_ATTR_NO_ELEM); } doWriteAttr(localName, nsURI, findOrCreateAttrPrefix(null, nsURI, mCurrElem), value); }
@Override public void writeAttribute(String prefix, String nsURI, String localName, String value) throws XMLStreamException { if (!mStartElementOpen) { throwOutputError(ErrorConsts.WERR_ATTR_NO_ELEM); } doWriteAttr(localName, nsURI, findOrCreateAttrPrefix(prefix, nsURI, mCurrElem), value); }
public void writeDefaultNamespace(String nsURI) throws XMLStreamException { /* 01-Sep-2006, TSa: The use case for calling this method is that * of caller may wanting to 'suggest' that * such a namespace should indeed be bound at this level. This * may be necessary for canonicalization, or for minimizing number * of binding declarations (all children need the ns, but root * itself not). */ if (!mStartElementOpen) { throwOutputError(ERR_NSDECL_WRONG_STATE); } /* ... We have one complication though: if the current element * uses default namespace, can not change it (attributes don't * matter -- they never use the default namespace, but either don't * belong to a namespace, or belong to one using explicit prefix) */ String prefix = mCurrElem.getPrefix(); if (prefix != null && prefix.length() > 0) { // ok, can change it mCurrElem.setDefaultNsUri(nsURI); doWriteDefaultNs(nsURI); } }
public void writeNamespace(String prefix, String nsURI) throws XMLStreamException { /* (see discussion in 'writeDefaultNamespace()' for details on * if and how this method may get called in repairing mode) */ if (prefix == null || prefix.length() == 0) { writeDefaultNamespace(nsURI); return; } if (!mStartElementOpen) { throwOutputError(ERR_NSDECL_WRONG_STATE); } /* 01-Sep-2006, TSa: Let's only add the declaration if the prefix * is as of yet unbound. If we have to re-bind things in future, * so be it -- for now, this should suffice (and if we have to * add re-binding, must verify that no attribute, nor element * itself, is using overridden prefix) */ int value = mCurrElem.isPrefixValid(prefix, nsURI, true); if (value == SimpleOutputElement.PREFIX_UNBOUND) { mCurrElem.addPrefix(prefix, nsURI); doWriteNamespace(prefix, nsURI); } }