Tabnine Logo
XmlUtil
Code IndexAdd Tabnine to your IDE (free)

How to use
XmlUtil
in
org.identityconnectors.common

Best Java code snippets using org.identityconnectors.common.XmlUtil (Showing top 20 results out of 315)

origin: org.connid/connid-framework-internal

public int getNumSubObjects() {
  int count = 0;
  for (Element subElement = XmlUtil.getFirstChildElement(_node);
     subElement != null;
     subElement = XmlUtil.getNextElement(subElement)) {
    count++;
  }
  return count;
}
origin: net.tirasa.connid/connector-framework-internal

private String readStringContentsInternal() {
  String xml = XmlUtil.getContent(node);
  return xml;
}
origin: net.tirasa.connid/connector-framework-internal

    if (expectedClass.isArray()) {
      List<Object> temp = new ArrayList<>();
      for (Element child = XmlUtil.getFirstChildElement(node); child != null; child =
          XmlUtil.getNextElement(child)) {
        XmlObjectDecoder sub = new XmlObjectDecoder(child, null);
        Object obj = sub.readObject();
  return null;
} else if (node.getTagName().equals("Array")) {
  String componentType = XmlUtil.getAttribute(node, "componentType");
  if (componentType == null) {
    componentType = "Object";
  for (Element child = XmlUtil.getFirstChildElement(node); child != null; child =
      XmlUtil.getNextElement(child)) {
    XmlObjectDecoder sub = new XmlObjectDecoder(child, null);
    Object obj = sub.readObject();
origin: org.connid/framework

/**
 * Returns the First child element or null if none found
 * @param node The node. May be null.
 * @return the First child element or null if none found
 */
public static Element getFirstChildElement(Node node) {
  if ( node == null ) {
    return null;
  }
  Node child = node.getFirstChild();
  if ( child instanceof Element ) {
    return (Element)child;
  }
  else {
    return getNextElement(child);
  }
}
 
origin: org.connid/connid-framework-internal

public Object readObjectField(String fieldName, Class<?> expected, Object dflt) {
  Element child = XmlUtil.findImmediateChildElement(_node, fieldName);
  if ( child == null ) {
    return dflt;
  }
  if ( expected != null ) {
    return new XmlObjectDecoder(child,expected).readObject();
  }
  Element subElement = XmlUtil.getFirstChildElement(child);
  if ( subElement == null ) {
    return dflt;
  }
  //if they specify null, don't apply defaults
  return new XmlObjectDecoder(subElement,null).readObject();    
}
origin: org.connid/connid-framework-internal

private void writeAttributeInternal(String fieldName, String str) {
  StringBuilder previousBuilder = getPreviousBuilder();
  previousBuilder.append(" ").append(fieldName).append("='");
  XmlUtil.escape(previousBuilder, str, XmlUtil.SINGLE_QUOTE);
  previousBuilder.append("'");
}
private void writeStringContentsInternal(String str) {
origin: net.tirasa.connid/connector-framework

  child.getNextSibling()) {
found = findText(child, ignoreEmpty);
origin: org.connid/framework

} else if (ch >= 0x20 && ch < 0x7f) {
  b.append(ch);
} else if (validXmlChar(ch)) {
  b.append(ch);
origin: org.connid/connid-framework-internal

  if (_expectedClass.isArray()) {
    List<Object> temp = new ArrayList<Object>();
    for (Element child = XmlUtil.getFirstChildElement(_node); child != null;
       child = XmlUtil.getNextElement(child)) {
      XmlObjectDecoder sub = new XmlObjectDecoder(child,null);
      Object obj = sub.readObject();
String componentType = XmlUtil.getAttribute(_node, "componentType");
if ( componentType == null ) {
  componentType = "Object";
for (Element child = XmlUtil.getFirstChildElement(_node); child != null;
   child = XmlUtil.getNextElement(child)) {
  XmlObjectDecoder sub = new XmlObjectDecoder(child,null);
  Object obj = sub.readObject();
origin: Tirasa/ConnId

/**
 * Returns the First child element or null if none found
 *
 * @param node
 *            The node. May be null.
 * @return the First child element or null if none found
 */
public static Element getFirstChildElement(Node node) {
  if (node == null) {
    return null;
  }
  Node child = node.getFirstChild();
  if (child instanceof Element) {
    return (Element) child;
  } else {
    return getNextElement(child);
  }
}
origin: net.tirasa.connid/connector-framework-internal

@Override
public Object readObjectField(String fieldName, Class<?> expected, Object dflt) {
  Element child = XmlUtil.findImmediateChildElement(node, fieldName);
  if (child == null) {
    return dflt;
  }
  if (expected != null) {
    return new XmlObjectDecoder(child, expected).readObject();
  }
  Element subElement = XmlUtil.getFirstChildElement(child);
  if (subElement == null) {
    return dflt;
  }
  // if they specify null, don't apply defaults
  return new XmlObjectDecoder(subElement, null).readObject();
}
origin: net.tirasa.connid/connector-framework-internal

private void writeAttributeInternal(String fieldName, String str) {
  StringBuilder previousBuilder = getPreviousBuilder();
  previousBuilder.append(" ").append(fieldName).append("='");
  XmlUtil.escape(previousBuilder, str, XmlUtil.SINGLE_QUOTE);
  previousBuilder.append("'");
}
origin: org.connid/framework

  && found == null; child = child.getNextSibling()) {
found = findText(child, ignoreEmpty);
origin: net.tirasa.connid/connector-framework

} else if (ch >= 0x20 && ch < 0x7f) {
  b.append(ch);
} else if (validXmlChar(ch)) {
  b.append(ch);
origin: net.tirasa.connid/connector-framework-internal

@Override
public int getNumSubObjects() {
  int count = 0;
  for (Element subElement = XmlUtil.getFirstChildElement(node); subElement != null; subElement =
      XmlUtil.getNextElement(subElement)) {
    count++;
  }
  return count;
}
origin: Tirasa/ConnId

    if (expectedClass.isArray()) {
      List<Object> temp = new ArrayList<>();
      for (Element child = XmlUtil.getFirstChildElement(node); child != null; child =
          XmlUtil.getNextElement(child)) {
        XmlObjectDecoder sub = new XmlObjectDecoder(child, null);
        Object obj = sub.readObject();
  return null;
} else if (node.getTagName().equals("Array")) {
  String componentType = XmlUtil.getAttribute(node, "componentType");
  if (componentType == null) {
    componentType = "Object";
  for (Element child = XmlUtil.getFirstChildElement(node); child != null; child =
      XmlUtil.getNextElement(child)) {
    XmlObjectDecoder sub = new XmlObjectDecoder(child, null);
    Object obj = sub.readObject();
origin: net.tirasa.connid/connector-framework

/**
 * Returns the First child element or null if none found
 *
 * @param node
 *            The node. May be null.
 * @return the First child element or null if none found
 */
public static Element getFirstChildElement(Node node) {
  if (node == null) {
    return null;
  }
  Node child = node.getFirstChild();
  if (child instanceof Element) {
    return (Element) child;
  } else {
    return getNextElement(child);
  }
}
origin: Tirasa/ConnId

@Override
public Object readObjectField(String fieldName, Class<?> expected, Object dflt) {
  Element child = XmlUtil.findImmediateChildElement(node, fieldName);
  if (child == null) {
    return dflt;
  }
  if (expected != null) {
    return new XmlObjectDecoder(child, expected).readObject();
  }
  Element subElement = XmlUtil.getFirstChildElement(child);
  if (subElement == null) {
    return dflt;
  }
  // if they specify null, don't apply defaults
  return new XmlObjectDecoder(subElement, null).readObject();
}
origin: org.connid/connid-framework-internal

private void writeStringContentsInternal(String str) {
  StringBuilder builder = getCurrentBuilder();
  XmlUtil.escape(builder, str, XmlUtil.NO_DELIM);
}
private void indent(StringBuilder builder, int level) {
origin: Tirasa/ConnId

  child.getNextSibling()) {
found = findText(child, ignoreEmpty);
org.identityconnectors.commonXmlUtil

Most used methods

  • getNextElement
    Get the next right sibling that is an element.
  • escape
    Escapes the given string and appends to the given buffer
  • findImmediateChildElement
    Find an immediate child of the given name
  • findText
    Locate the first text node at any level below the given node. If the ignoreEmpty flag is true, we wi
  • getAttribute
    Return the value of an attribute on an element. The DOM getAttribute method returns an empty string
  • getContent
    Return the content of the given element. We will descend to an arbitrary depth looking for the first
  • getFirstChildElement
    Returns the First child element or null if none found
  • validXmlChar
    legal xml chars from http://www.xml.com/axml/testaxml.htm Char::= #x9 | #xA | #xD | [#x20-#xD7FF] |

Popular in Java

  • Start an intent from android
  • putExtra (Intent)
  • compareTo (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now