Search in sources :

Example 6 with Attribute

use of de.pdark.decentxml.Attribute in project sling by apache.

the class ModifiableProperties method setNode.

public void setNode(GenericJcrRootFile genericJcrRootFile, Element domNode) {
    this.domElement = domNode;
    final List<Attribute> attributes = domNode.getAttributes();
    if (attributes != null) {
        for (Attribute attribute : attributes) {
            final String name = attribute.getName();
            if (name.startsWith("xmlns:")) {
                continue;
            }
            properties.put(name, attribute.getValue());
            propertiesOrder.add(name);
        }
    }
    this.genericJcrRootFile = genericJcrRootFile;
}
Also used : Attribute(de.pdark.decentxml.Attribute)

Aggregations

Attribute (de.pdark.decentxml.Attribute)6 CoreException (org.eclipse.core.runtime.CoreException)3 RepositoryException (org.apache.sling.ide.transport.RepositoryException)2 IFile (org.eclipse.core.resources.IFile)2 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)2 Document (de.pdark.decentxml.Document)1 Element (de.pdark.decentxml.Element)1 XMLParseException (de.pdark.decentxml.XMLParseException)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Iterator (java.util.Iterator)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 Map (java.util.Map)1 Entry (java.util.Map.Entry)1 ParserConfigurationException (javax.xml.parsers.ParserConfigurationException)1 Logger (org.apache.sling.ide.log.Logger)1 SerializationKind (org.apache.sling.ide.serialization.SerializationKind)1