Code example for Element

Methods: getFirstChildgetPrefix

    //then this returns false.  The local part of the faultcode is then check to see 
    //if it is one of the permitted values. 
    if (faultCodeElem == null)
      return false; 
    String faultCode = faultCodeElem.getFirstChild().getNodeValue().trim();
    if (faultCode == null)
      return false; 
    String faultCodeElemPrefix = faultCodeElem.getPrefix();
    String faultCodePrefix = faultCode.substring(0, faultCode.indexOf(':'));
    String faultCodeName =
      faultCode.substring(faultCode.indexOf(':') + 1, faultCode.length());
    if ((faultCodeElemPrefix != null || faultCodePrefix != null))
      if (faultCodePrefix.equals(faultCodeElemPrefix)
        && (faultCodeName.equals("MustUnderstand")
          || faultCodeName.startsWith("MustUnderstand.")))
        return true; 
Contextual code suggestions in your IDE  Get Codota for Java