@Override String getNamespacePrefix(Object node) { if (node instanceof Element) { return ((Element) node).getNamespacePrefix(); } if (node instanceof Attribute) { return ((Attribute) node).getNamespacePrefix(); } return null; }
/** * Determines if element is a special case of XML elements * where it contains an xml:space attribute of "preserve". * If it does, then retain whitespace. */ protected final boolean isElementSpacePreserved(Element element) { final Attribute attr = element.attribute("space"); boolean preserveFound=preserve; //default to global state if (attr!=null) { if ("xml".equals(attr.getNamespacePrefix()) && "preserve".equals(attr.getText())) { preserveFound = true; } else { preserveFound = false; } } return preserveFound; } /** Outputs the content of the given element. If whitespace trimming is
public String getAttributePrefix(int index) { if (element != null) { Attribute attribute = element.attribute(index); if (attribute != null) { String prefix = attribute.getNamespacePrefix(); if ((prefix != null) && (prefix.length() > 0)) { return prefix; } } } return null; }
public boolean isAttributeNamespaceDeclaration(int index) { if (element != null) { Attribute attribute = element.attribute(index); if (attribute != null) { return "xmlns".equals(attribute.getNamespacePrefix()); } } return false; }
/** * Determines if element is a special case of XML elements where it contains * an xml:space attribute of "preserve". If it does, then retain whitespace. * * @param element * DOCUMENT ME! * * @return DOCUMENT ME! */ protected final boolean isElementSpacePreserved(Element element) { final Attribute attr = (Attribute) element.attribute("space"); boolean preserveFound = preserve; // default to global state if (attr != null) { preserveFound = "xml".equals(attr.getNamespacePrefix()) && "preserve".equals(attr.getText()); } return preserveFound; }
public boolean isAttributeNamespaceDeclaration(int index) { if (element != null) { Attribute attribute = element.attribute(index); if (attribute != null) { return "xmlns".equals(attribute.getNamespacePrefix()); } } return false; }
public String getAttributePrefix(int index) { if (element != null) { Attribute attribute = element.attribute(index); if (attribute != null) { String prefix = attribute.getNamespacePrefix(); if ((prefix != null) && (prefix.length() > 0)) { return prefix; } } } return null; }
@Override String getNamespacePrefix(Object node) { if (node instanceof Element) { return ((Element) node).getNamespacePrefix(); } if (node instanceof Attribute) { return ((Attribute) node).getNamespacePrefix(); } return null; }
public String getAttributePrefix(int index) { if (element != null) { Attribute attribute = element.attribute(index); if (attribute != null) { String prefix = attribute.getNamespacePrefix(); if ((prefix != null) && (prefix.length() > 0)) { return prefix; } } } return null; }
public boolean isAttributeNamespaceDeclaration(int index) { if (element != null) { Attribute attribute = element.attribute(index); if (attribute != null) { return "xmlns".equals(attribute.getNamespacePrefix()); } } return false; }
public boolean isAttributeNamespaceDeclaration(int index) { if (element != null) { Attribute attribute = element.attribute(index); if (attribute != null) { return "xmlns".equals(attribute.getNamespacePrefix()); } } return false; }
public String getAttributePrefix(int index) { if (element != null) { Attribute attribute = element.attribute(index); if (attribute != null) { String prefix = attribute.getNamespacePrefix(); if ((prefix != null) && (prefix.length() > 0)) { return prefix; } } } return null; }
@Override String getNamespacePrefix(Object node) { if (node instanceof Element) { return ((Element) node).getNamespacePrefix(); } if (node instanceof Attribute) { return ((Attribute) node).getNamespacePrefix(); } return null; }
public boolean isAttributeNamespaceDeclaration(int index) { if (element != null) { Attribute attribute = element.attribute(index); if (attribute != null) { return "xmlns".equals(attribute.getNamespacePrefix()); } } return false; }
public String getAttributePrefix(int index) { if (element != null) { Attribute attribute = element.attribute(index); if (attribute != null) { String prefix = attribute.getNamespacePrefix(); if ((prefix != null) && (prefix.length() > 0)) { return prefix; } } } return null; }
public String getAttributePrefix(int index) { if (element != null) { Attribute attribute = element.attribute(index); if (attribute != null) { String prefix = attribute.getNamespacePrefix(); if ((prefix != null) && (prefix.length() > 0)) { return prefix; } } } return null; }
public boolean isAttributeNamespaceDeclaration(int index) { if (element != null) { Attribute attribute = element.attribute(index); if (attribute != null) { return "xmlns".equals(attribute.getNamespacePrefix()); } } return false; }
String getNamespacePrefix(Object node) { if(node instanceof Element) { return ((Element)node).getNamespacePrefix(); } if(node instanceof Attribute) { return ((Attribute)node).getNamespacePrefix(); } return null; }
public String getAttributePrefix(int index) { if (element != null) { Attribute attribute = element.attribute(index); if (attribute != null) { String prefix = attribute.getNamespacePrefix(); if ((prefix != null) && (prefix.length() > 0)) { return prefix; } } } return null; }
public String getAttributePrefix(int index) { if (element != null) { Attribute attribute = element.attribute(index); if (attribute != null) { String prefix = attribute.getNamespacePrefix(); if ((prefix != null) && (prefix.length() > 0)) { return prefix; } } } return null; }