public void writeStartElement(String prefix, String local, String ns) throws XMLStreamException { String parentKey = current.getTreeKey(); stack.push(current); String key = convention.createKey(prefix, ns, local); current = new JSONPropertyString(key, parentKey); }
public void writeAttribute(String prefix, String ns, String local, String value) throws XMLStreamException { String key = convention.isElement(prefix, ns, local) ? convention.createKey(prefix, ns, local) : convention.createAttributeKey(prefix, ns, local); JSONPropertyString prop = new JSONPropertyString(key, null); prop.addText(value); current = current.withProperty(prop, false); }