0

I am trying to parse a xml string, my xml looks like this:

xmlString=    <Resources>
    <Resource>
    <ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:anyURI-equal">
    <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://medico.com/record/patient/BartSimpson</AttributeValue><ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#anyURI"/>
    </ResourceMatch>
    </Resource>
    </Resources>

I am doing the following:

DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
InputSource is = new InputSource();
is.setCharacterStream(new StringReader(xmlString));

Document doc = db.parse(is);

doc is coming null.

Pascal
  • 1,288
  • 8
  • 13
Phalguni Mukherjee
  • 623
  • 3
  • 11
  • 29

0 Answers0