public void write(XoXMLStreamWriter writer, String value, RuntimeContext context) throws Exception { if (value == null) { writer.writeXsiNil(); } else { writer.writeCharacters(value); } } }
public void writeEmptyElement(String namespaceURI, String localName) throws XMLStreamException { beforeStartElement(localName, null); writeEmptyElement(null, namespaceURI, localName); afterEndElement(); }
public void writeAsXmlList(int[] values) throws XMLStreamException { for (int value : values) { writeInt(value); writeCharacters(" "); } }
public QName read(XoXMLStreamReader reader, RuntimeContext context) throws Exception { if (reader.isXsiNil()) return null; QName value = reader.getElementAsQName(); return value; }
protected void beforeEndElement() throws XMLStreamException { Element element = elements.remove(); unindent(); if (element.hasChildElements()) { writeNewLine(); writeIndent(); } }
public void writeAndDeclareIfUndeclared(String prefix, String namespace) throws XMLStreamException { if (!namespace.equals(defaultNamespace.getNamespaceURI()) && getPrefix(namespace) == null) { writeNamespace(prefix, namespace); setPrefix(prefix, namespace); } }
public void writeStartElement(String namespaceURI, String localName) throws XMLStreamException { beforeStartElement(localName, namespaceURI); writeStartElement(null, namespaceURI, localName); afterStartElement(localName, namespaceURI); }
public void writeAsXmlList(long[] values) throws XMLStreamException { for (long value : values) { writeLong(value); writeCharacters(" "); } }
public QName getXsiType() { String val = getAttributeValue(XSI_NS, "type"); if (val != null) { return getAsQName(val); } return null; }
public QName getElementAsQName() throws XMLStreamException { String val = getElementAsString(); if (val != null) { return getAsQName(val); } return null; }
public void writeAsXmlList(double[] values) throws XMLStreamException { for (double value : values) { writeDouble(value); writeCharacters(" "); } }
/** * Returns base64 representation of specified byte array. */ public static String encode(byte[] data) { return encode(data, 0, data.length); }
public void writeAsXmlList(short[] values) throws XMLStreamException { for (short value : values) { writeShort(value); writeCharacters(" "); } }
public void writeAsXmlList(float[] values) throws XMLStreamException { for (float value : values) { writeFloat(value); writeCharacters(" "); } }
public boolean hasNext() { if (moveToNext) { advanceToNext(); } return hasMoreEvents; }
/** * Assert that the following XPath query selects no nodes. * * @param xpath */ public NodeList assertInvalid(String xpath, Node node) throws Exception { return XPathAssert.assertInvalid(xpath, node, namespaces); }
public void writeString(String s) throws XMLStreamException { if (s == null) { return; } writeCharacters(s); }
public void setUp() throws Exception { addNamespace("s", "http://schemas.xmlsoap.org/soap/envelope/"); addNamespace("xsd", "http://www.w3.org/2001/XMLSchema"); addNamespace("wsdl", "http://schemas.xmlsoap.org/wsdl/"); addNamespace("wsdlsoap", "http://schemas.xmlsoap.org/wsdl/soap/"); addNamespace("soap", "http://schemas.xmlsoap.org/soap/"); addNamespace("soap12env", "http://www.w3.org/2003/05/soap-envelope"); addNamespace("xml", "http://www.w3.org/XML/1998/namespace"); }
/** * Assert that the following XPath query selects one or more nodes. * * @param xpath * @throws Exception */ public NodeList assertValid(String xpath, Node node) throws Exception { return XPathAssert.assertValid(xpath, node, namespaces); }
public void writeStartElement(String localName) throws XMLStreamException { beforeStartElement(localName, null); writeStartElement(null, null, localName); afterStartElement(localName, null); }