title: Why is my code not parsing a given string to xml as here? It is not duplicate as I used help from existing answers too but can't correct it
body: <pre><code> public static void main(String[] args) throws SAXException, ParserConfigurationException, IOException
      {
          String fXml="&lt;?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?&gt;\n" +
  "&lt;Emp id=\"1\"&gt;\n" +
  "    &lt;name&gt;Pankaj&lt;/name&gt;\n" +
  "    &lt;age&gt;25&lt;/age&gt;\n" +
  "    &lt;role&gt;Developer&lt;/role&gt;\n" +
  "    &lt;gen&gt;Male&lt;/gen&gt;\n" +
  "&lt;/Emp&gt;";
         DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
      DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
      Document doc = dBuilder.parse(fXml);
  
      doc.getDocumentElement().normalize();
  
      System.out.println("Root element :" + doc.getDocumentElement().getNodeName());
      }
  </code></pre>
  
  <p>I am getting the following errors:</p>
  
  <pre><code>Exception in thread "main" java.net.MalformedURLException: no protocol: &lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  </code></pre>
  
  <p>How do I make work as intuitive? Yeah the problem lies in the very first line but I am not sure how to correct this.</p>