@SuppressWarnings({"unchecked"}) @Override public Object doDeserialize(SerializedObject serializedObject, XStream xStream) { if ("org.dom4j.Document".equals(serializedObject.getContentType().getName())) { return xStream.unmarshal(new Dom4JReader((org.dom4j.Document) serializedObject.getData())); } if ("nu.xom.Document".equals(serializedObject.getContentType().getName())) { return xStream.unmarshal(new XomReader((nu.xom.Document) serializedObject.getData())); } InputStream serializedData = convert(serializedObject.getData(), serializedObject.getContentType(), InputStream.class); return xStream.fromXML(new InputStreamReader(serializedData, getCharset())); }
public String getAttributeName(int index) { return decodeAttribute(currentElement.getAttribute(index).getQualifiedName()); }
public String getNodeName() { return decodeNode(currentElement.getLocalName()); }
public String getAttribute(String name) { return currentElement.getAttributeValue(encodeAttribute(name)); }
public String getNodeName() { return unescapeXmlName(currentElement.getLocalName()); }
@Override public String getAttribute(final String name) { return currentElement.getAttributeValue(encodeAttribute(name)); }
public String getNodeName() { return unescapeXmlName(currentElement.getLocalName()); }
public HierarchicalStreamReader createReader(URL in) { try { final Document document = createBuilder().build(in.toExternalForm()); return new XomReader(document, getNameCoder()); } catch (ValidityException e) { throw new StreamException(e); } catch (ParsingException e) { throw new StreamException(e); } catch (IOException e) { throw new StreamException(e); } }
public String peekNextChild() { Elements children = currentElement.getChildElements(); if (null == children || children.size() == 0) { return null; } return decodeNode(children.get(0).getLocalName()); } }
@Override public String getAttributeName(final int index) { return decodeAttribute(currentElement.getAttribute(index).getQualifiedName()); }
public String getAttribute(String name) { return currentElement.getAttributeValue(encodeAttribute(name)); }
public String getAttributeName(int index) { return unescapeXmlName(currentElement.getAttribute(index).getQualifiedName()); }
public HierarchicalStreamReader createReader(Reader text) { try { final Document document = createBuilder().build(text); return new XomReader(document, getNameCoder()); } catch (ValidityException e) { throw new StreamException(e); } catch (ParsingException e) { throw new StreamException(e); } catch (IOException e) { throw new StreamException(e); } }
@Override public String getNodeName() { return decodeNode(currentElement.getLocalName()); }
public String getAttributeName(int index) { return decodeAttribute(currentElement.getAttribute(index).getQualifiedName()); }
public String getAttribute(String name) { return currentElement.getAttributeValue(encodeAttribute(name)); }
public String getAttributeName(int index) { return unescapeXmlName(currentElement.getAttribute(index).getQualifiedName()); }
public HierarchicalStreamReader createReader(File in) { try { final Document document = createBuilder().build(in); return new XomReader(document, getNameCoder()); } catch (ValidityException e) { throw new StreamException(e); } catch (ParsingException e) { throw new StreamException(e); } catch (IOException e) { throw new StreamException(e); } }
public String getNodeName() { return decodeNode(currentElement.getLocalName()); }
public String getAttributeName(int index) { return decodeAttribute(currentElement.getAttribute(index).getQualifiedName()); }