We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bf93f9d + 8a0a24e commit f35ce05Copy full SHA for f35ce05
splunk/src/main/java/com/splunk/modularinput/XmlUtil.java
@@ -35,10 +35,12 @@ class XmlUtil {
35
*/
36
static String textInNode(Node node, String errorMessage) throws MalformedDataException {
37
Node child = node.getFirstChild();
38
- if (child.getNodeType() != Node.TEXT_NODE) {
+ if (null == child) {
39
+ return "";
40
+ } else if (child.getNodeType() != Node.TEXT_NODE) {
41
throw new MalformedDataException(errorMessage);
42
} else {
- return ((Text)child).getData();
43
+ return ((Text) child).getData();
44
}
45
46
0 commit comments