title: spring security tags for html
body: <p>I am trying to hide different html content based on what role is logged in.
  I set the namespace:</p>
  
  <pre><code>&lt;html lang="en" xmlns:security="http://www.springframework.org/security/tags" xmlns:th="http://www.springframework.org/schema/mvc"&gt;
  </code></pre>
  
  <p>And then I tried something like this:</p>
  
  <pre><code>     &lt;security:authorize access="hasRole('ADMIN')"&gt;
            &lt;li&gt;&lt;a href="/users"&gt;User Management&lt;/a&gt;&lt;/li&gt;
       &lt;/security:authorize&gt;
  </code></pre>
  
  <p>However I am getting this error message:</p>
  
  <pre><code>[THYMELEAF][http-nio-8080-exec-6] Fatal error during parsing
  org.xml.sax.SAXParseException: The content of elements must consist of 
  well-formed character data or markup.
  </code></pre>
  
  <p>Thanks!</p>
  
  <p>EDIT:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en" xmlns:th="http://www.springframework.org/schema/mvc" xmlns:security="http://www.springframework.org/security/tags"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"/&gt;
      &lt;title&gt;Title&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div th:fragment="navbar"&gt;
      &lt;nav class="navbar navbar-default"&gt;
          &lt;div class="container"&gt;
              &lt;div class="navbar-header"&gt;
                  &lt;button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"&gt;
                  &lt;span class="sr-only"&gt;Toggle navigation&lt;/span&gt;
                  &lt;span class="icon-bar"&gt;&lt;/span&gt;
                  &lt;span class="icon-bar"&gt;&lt;/span&gt;
                  &lt;span class="icon-bar"&gt;&lt;/span&gt;
              &lt;/button&gt;
              &lt;a class="navbar-brand" href="/"&gt;&lt;label id="label-mhealth"&gt;mHealth Store&lt;/label&gt;&lt;/a&gt;
          &lt;/div&gt;
  
          &lt;!-- Collect the nav links, forms, and other content for toggling --&gt;
          &lt;div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"&gt;
              &lt; class="nav navbar-nav"&gt;
                  &lt;li class="dropdown"&gt;
                      &lt;a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"&gt;Product Management &lt;span class="caret"&gt;&lt;/span&gt;&lt;/a&gt;
                      &lt;ul class="dropdown-menu"&gt;
                          &lt;li&gt;&lt;a href="/products"&gt;Product List&lt;/a&gt;&lt;/li&gt;
                      &lt;/ul&gt;
                  &lt;/li&gt;
              &lt;security:authorize access="hasRole('ADMIN')"&gt;
                  &lt;li&gt;&lt;a href="/users"&gt;User Management&lt;/a&gt;&lt;/li&gt;
              &lt;/security:authorize&gt;
          &lt;/div&gt;&lt;!-- /.navbar-collapse --&gt;
      &lt;/div&gt;&lt;!-- /.container-fluid --&gt;
      &lt;/nav&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>