got a little problem. I have the following code:

```
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        DocumentBuilder builder = factory.newDocumentBuilder();
        Document doc = builder.parse("result1.xml");
        XPathFactory xPathfactory = XPathFactory.newInstance();
        XPath xpath = xPathfactory.newXPath();
        XPathExpression expr = xpath.compile("//element");
        String elements = (String) expr.evaluate(doc, XPathConstants.STRING);

```

What i get : 

```
        jcruz0@exblog.jp
        Cheryl
        Blake
        195115

```

What i want:

```
<person> 
  <email>jcruz0@exblog.jp</email>
  <firstname>Cheryl</firstname>
  <lastname>Blake</lastname>
  <number>195115</number> 
</person>

```

So as you can see i want the full XML tree. Not just the NodeValue.
Maybe somebody knows the trick.
Thanks for any help.
['https://Stackoverflow.com/questions/43963589', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']
The stack trace is pretty clear, it "talks" about this line:

```
<div th:utext="'Exception: ' + ${exception.message}" th:remove="tag">${exception.message}</div>

```

It seems that your server is failing to parse the Thymeleaf page, 

**it can't find the exception object with a message field**.

I tried to figure out where exactly you pass the exception **into your model**, but I did not find it.

This function is not doing that:

```
private Map<String, Object> getErrorAttributes(HttpServletRequest request,
                                                   boolean includeStackTrace) {
        RequestAttributes requestAttributes = new ServletRequestAttributes(request);
        return this.errorAttributes.getErrorAttributes(requestAttributes,
                includeStackTrace);
    }

```
You can check for null on the `exception`:

```
<div th:if="${exception != null}" 
 th:utext="'Exception: ' + ${exception.message}" th:remove="tag">
</div>

```

Or you can use the shorthand: 

```
 <div th:utext="'Exception: ' + ${exception?.message}" th:remove="tag"></div>

```