public class XMLUtils extends Object
Constructor and Description |
---|
XMLUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
addField(String prefix,
String field)
Generates a nested field name by combining a field prefix to the current field name.
|
static boolean |
hasAttributes(XMLEvent event)
Returns true if a given XMLEvent has attributes, false if not.
|
static boolean |
isEmptyWhiteSpace(XMLEvent event)
Empty events are not helpful so this method checks to see if the event consists solely of whitespace
or newline characters.
|
static boolean |
isNotCruft(XMLEvent event)
Identifies XML events that may be populated but are not useful for extracting data.
|
static String |
removeField(String prefix,
String fieldName)
Returns the field name from nested field names.
|
public static boolean isEmptyWhiteSpace(XMLEvent event)
event
- The input XMLEventpublic static boolean isNotCruft(XMLEvent event)
event
- The XMLEvent in questionpublic static String addField(String prefix, String field)
prefix
- The prefix to be added to the field name.field
- The field namepublic static String removeField(String prefix, String fieldName)
fieldName
- The nested field namepublic static boolean hasAttributes(XMLEvent event)
event
- The XMLEvent in questionCopyright © 1970 The Apache Software Foundation. All rights reserved.