Convert the given element (which should be the "LOADPATH" global
variable) to a list of strings. The list can be used in the template
loading method.

@param element
element to convert to list of string (should be "LOADPATH"
global variable)
773456
static public List<String> convertLoadpathVariable(Element element) {

        // Create the list of strings. Always add the empty string as this will
        // force the lookup routine to always include the "current" directory.
        LinkedList<String> filelist = new LinkedList<String>();
        filelist.add("");

        // If the argument is null (the variable doesn't exist), then just
        // return the list with the current directory.
        if (element == null) {
            return filelist;
        }

        // Verify that the element is of the correct type (i.e. a list).
        if (!(element instanceof ListResource)) {
            throw new EvaluationException("LOADPATH variable must be a list");
        }

        // Loop over the values in the list.
        ListResource loadpath = (ListResource) element;
        for (int i = 0; i < loadpath.size(); i++) {
            try {
                Element child = loadpath.get(TermFactory.create(i));
                if (child instanceof StringProperty) {
                    String sfile = ((StringProperty) child).getValue();
                    if (sfile.startsWith("/")) {
                        throw new EvaluationException(
                                "LOADPATH can only contain relative paths");
                    }
                    filelist.add(sfile);
                } else {
                    throw new EvaluationException(
                            "LOADPATH contains non-string value");
                }
            } catch (InvalidTermException ite) {
                // This exception should never be encountered because the terms
                // are all indexes and the resource is a list.
                throw CompilerError.create(MSG_INVALID_KEY_OR_INDEX);
            }

        }

        return filelist;
    }
1004816
public static org.w3c.dom.Element convertElement(Element element) {
        return NodeAdaptors.getElement(element);
    }
875964
@SuppressWarnings("unchecked")
    public static List<Element> elements(Element element, QName name) {

        return element.elements(name);
    }
554121
public void set(Element element) {
        if (element == null) {
            throw new NullPointerException("element == null");
        }

        CstString pairName = new CstString(element.getName());
        Constant pairValue = Element.toConstant(element.getValue());
        NameValuePair nameValuePair = new NameValuePair(pairName, pairValue);
        elements.put(element.getName(), nameValuePair);
    }
1074388
public synchronized void addElement(@NonNull T element) {
        hashCached = false;
        this.elementsMap.put(element.getLabel(), element);
        this.elements.add(element);
    }
191038
protected static String getElement(JWTPayload payload, String element) {
        String output = null;
        if (payload != null) {
            Object outObj = payload.get(element);
            if (outObj instanceof String) {
                output = (String) outObj;
            } else if (outObj instanceof List) {
                if (((List<String>) outObj).size() == 1) {
                    output = ((List<String>) outObj).get(0);
                }
                // if there are multiple values, return null.
            }
        }
        return output;
    }
55782
private static String[] appendToStringArray(String[] array, String element) {
		if (array != null) {
			String[] newArray = new String[array.length + 1];
			for (int i = 0; i < array.length; i++) {
				newArray[i] = array[i];
			}
			newArray[array.length] = element;
			return newArray;
		} else {
			return new String[] { element };
		}
	}
340721
public void addElement(Element element) {
		synchronized(lock) {
			checkNotFrozen();
			element.setPage(this);
			// elements
			if(elements == null) elements = new ArrayList<>();
			elements.add(element);
			// elementsById
			addToElementsById(element, false);
		}
	}
134800
@Override
  @NullSafe
  public synchronized void add(T element) {

    Optional.ofNullable(element)
      .ifPresent(it -> {

        int hashCode = it.hashCode();
        int index = (hashCode % getScale());

        BloomFilter<T> bloomFilter = resolveBloomFilter(index);

        bloomFilter.add(it);
      });
  }
384054
private Object parseXmlElement(Element element) {
        if(element.getFirstChild() instanceof Text) {
            Text text = (Text) element.getFirstChild();
            return text.getData();
        }
        return element;
    }
85004
public Element getElement(NodeList list, String key, String value) {
	int len = list.getLength();
	for (int i = 0; i < len; i++) {
	    Node n = list.item(i);
	    if (n instanceof Element) {
		Element el = (Element) n;
		if (el.getAttribute(key).equalsIgnoreCase(value)) return el;
	    }
	}
	return null;
    }
1143986
@SuppressWarnings("unchecked")
    public static List<Element> elements(Element element, String name) {

        return element.elements(name);
    }
148246
public synchronized void removeElement(T element) {
    checkArgument(
        element.getNext() != null || element.getPrev() != null || element == head,
        "Element not in the list.");
    size--;
    T prev = element.getPrev();
    T next = element.getNext();
    if (prev == null) {
      // This is the first element
      head = next;
      if (head != null) {
        // If more than one element in the list.
        head.setPrev(null);
        element.setNext(null);
      }
    } else if (next == null) {
      // This is the last element, and there is at least another element because
      // element.getPrev() != null.
      prev.setNext(null);
      element.setPrev(null);
    } else {
      prev.setNext(element.getNext());
      next.setPrev(element.getPrev());
      element.setNext(null);
      element.setPrev(null);
    }
  }
1181550
private boolean isValidTemplateElement(String template, String element) {

        List elements = new ArrayList(getTemplateElements(template));
        Iterator i = elements.iterator();
        while (i.hasNext()) {
            CmsDialogElement currElement = (CmsDialogElement)i.next();
            if (element.equals(currElement.getName())) {
                return true;
            }
        }

        return false;
    }
380463
public final void setElement(final WebElement element) {

		if (element == null) {
			throw new IllegalArgumentException(String.format(ErrorMessages.ERROR_TEMPLATE_VARIABLE_NULL,"element"));
		}

		this.element = element;

		validateElementTag();
		validateAttributes();
	}
165686
private Optional<LocalComponent> getLocalComponentForElement(Element element) {
    String componentName = element.getAttributes().getValue("is");
    if (componentName == null) {
      componentName = element.getStartTag().getName();
    }

    return context.getLocalComponent(componentName);
  }
128082
private static String getTextContent(final Element element) {
		if (element != null) {
			String content = element.getTextContent();
			if (content != null) {
				content = content.trim();
			}
			return content;
		}
		return null;
	}