Refine search
protected Attr getNullNode(Document ownerDocument) { if (nullNode == null) { try { nullNode = ownerDocument.createAttributeNS( Constants.NamespaceSpecNS, XMLNS); nullNode.setValue(""); } catch (Exception e) { throw new RuntimeException("Unable to create nullNode: " + e); } } return nullNode; }
protected Element writeBodyElement(Document d) { Element envelopeElement = d.createElementNS(Constants.SOAP_NS_ENVELOPE, "s:Envelope"); Attr encodingStyleAttr = d.createAttributeNS(Constants.SOAP_NS_ENVELOPE, "s:encodingStyle"); encodingStyleAttr.setValue(Constants.SOAP_URI_ENCODING_STYLE); envelopeElement.setAttributeNode(encodingStyleAttr); d.appendChild(envelopeElement); Element bodyElement = d.createElementNS(Constants.SOAP_NS_ENVELOPE, "s:Body"); envelopeElement.appendChild(bodyElement); return bodyElement; }
Name = XMLNS + ":" + NName; Attr n = e.getOwnerDocument().createAttributeNS("http://www.w3.org/2000/xmlns/", Name); n.setValue(NValue); ns.addMapping(NName, NValue, n);
Name = "xmlns:" + NName; Attr n = e.getOwnerDocument().createAttributeNS("http://www.w3.org/2000/xmlns/", Name); n.setValue(NValue); ns.addMapping(NName, NValue, n);
Name = "xmlns:" + NName; Attr n = e.getOwnerDocument().createAttributeNS("http://www.w3.org/2000/xmlns/", Name); n.setValue(NValue); ns.addMapping(NName, NValue, n);
protected void setLocalIdAttribute(String attrName, String value) { if (value != null) { Attr attr = getDocument().createAttributeNS(null, attrName); attr.setValue(value); getElement().setAttributeNodeNS(attr); getElement().setIdAttributeNode(attr, true); } else { getElement().removeAttributeNS(null, attrName); } }
protected Element writeBodyElement(Document d) { Element envelopeElement = d.createElementNS(Constants.SOAP_NS_ENVELOPE, "s:Envelope"); Attr encodingStyleAttr = d.createAttributeNS(Constants.SOAP_NS_ENVELOPE, "s:encodingStyle"); encodingStyleAttr.setValue(Constants.SOAP_URI_ENCODING_STYLE); envelopeElement.setAttributeNode(encodingStyleAttr); d.appendChild(envelopeElement); Element bodyElement = d.createElementNS(Constants.SOAP_NS_ENVELOPE, "s:Body"); envelopeElement.appendChild(bodyElement); return bodyElement; }
Attr a = doc.createAttributeNS(attUri, attQName); a.setValue(attrs.getValue(i)); e.setAttributeNodeNS(a);
/** * This will handle printing of a {@link Attribute}. * * @param fstack * the FormatStack * @param basedoc * The org.w3c.dom.Document for creating DOM Nodes * @param attribute * <code>Attribute</code> to write. * @return The input JDOM Attribute converted to a DOM Attr */ protected org.w3c.dom.Attr printAttribute(final FormatStack fstack, final org.w3c.dom.Document basedoc, final Attribute attribute) { if (!attribute.isSpecified() && fstack.isSpecifiedAttributesOnly()) { return null; } org.w3c.dom.Attr attr = basedoc.createAttributeNS( attribute.getNamespaceURI(), attribute.getQualifiedName()); attr.setValue(attribute.getValue()); return attr; }
protected Attr getNullNode(Document ownerDocument) { if (nullNode == null) { try { nullNode = ownerDocument.createAttributeNS( Constants.NamespaceSpecNS, XMLNS); nullNode.setValue(""); } catch (Exception e) { throw new RuntimeException("Unable to create nullNode: " + e); } } return nullNode; }
public void writeAttribute(String local, String value) throws XMLStreamException { Attr a; if (local.startsWith("xmlns") && (local.length() == 5 || local.charAt(5) == ':')) { a = document.createAttributeNS(XML_NS, local); } else { a = document.createAttributeNS(null, local); } a.setValue(value); ((Element)currentNode).setAttributeNode(a); }
public void writeAttribute(String local, String value) throws XMLStreamException { Attr a; if (local.startsWith("xmlns") && (local.length() == 5 || local.charAt(5) == ':')) { a = document.createAttributeNS(XML_NS, local); } else { a = document.createAttributeNS(null, local); } a.setValue(value); ((Element)currentNode).setAttributeNode(a); }
public void writeAttribute(String local, String value) throws XMLStreamException { Attr a; if (local.startsWith("xmlns") && (local.length() == 5 || local.charAt(5) == ':')) { a = document.createAttributeNS(XML_NS, local); } else { a = document.createAttributeNS(null, local); } a.setValue(value); ((Element)currentNode).setAttributeNode(a); }
public void writeAttribute(String local, String value) throws XMLStreamException { Attr a; if (local.startsWith("xmlns") && (local.length() == 5 || local.charAt(5) == ':')) { a = document.createAttributeNS(XML_NS, local); } else { a = document.createAttributeNS(null, local); } a.setValue(value); ((Element)currentNode).setAttributeNode(a); }
public void writeDefaultNamespace(String namespace) throws XMLStreamException { Attr attr = document.createAttributeNS(XML_NS, "xmlns"); attr.setValue(namespace); ((Element)currentNode).setAttributeNodeNS(attr); }
public void writeAttribute(String namespace, String local, String value) throws XMLStreamException { Attr a = document.createAttributeNS(namespace, local); a.setValue(value); ((Element)currentNode).setAttributeNodeNS(a); }
private static void declare(Element node, String uri, String prefix) { String qualname; if (prefix != null && prefix.length() > 0) { qualname = "xmlns:" + prefix; } else { qualname = "xmlns"; } Attr attr = node.getOwnerDocument().createAttributeNS(XML_NS, qualname); attr.setValue(uri); node.setAttributeNodeNS(attr); } public static XMLStreamReader createXMLStreamReader(InputSource src) {
public void writeDefaultNamespace(String namespace) throws XMLStreamException { Attr attr = document.createAttributeNS(XML_NS, "xmlns"); attr.setValue(namespace); ((Element)currentNode).setAttributeNodeNS(attr); }
public void writeAttribute(String namespace, String local, String value) throws XMLStreamException { Attr a = document.createAttributeNS(namespace, local); a.setValue(value); ((Element)currentNode).setAttributeNodeNS(a); }
private static void declare(Element node, String uri, String prefix) { String qualname; if (prefix != null && prefix.length() > 0) { qualname = "xmlns:" + prefix; } else { qualname = "xmlns"; } Attr attr = node.getOwnerDocument().createAttributeNS("http://www.w3.org/2000/xmlns/", qualname); attr.setValue(uri); node.setAttributeNodeNS(attr); } }