title: Flask example with POST
body: <p>Suppose the following route which accesses an xml file to replace the text of a specific tag with a given xpath (?key=):</p>
  
  <pre><code>@app.route('/resource', methods = ['POST'])
  def update_text():
      # CODE
  </code></pre>
  
  <p>Then, I would use cURL like this:</p>
  
  <pre><code>curl -X POST http://ip:5000/resource?key=listOfUsers/user1 -d "John"
  </code></pre>
  
  <p>The xpath expreesion <code>listOfUsers/user1</code> should access the tag <code>&lt;user1&gt;</code> to change its current text to "John".</p>
  
  <p>I have no idea on how to achieve this because I'm just starting to learn Flask and REST and I can't find any good example for this specific case. Also, I'd like to use lxml to manipulate the xml file since I already know it. </p>
  
  <p>Could somebody help and provide an example to guide me?</p>