Arun
Arun

Reputation: 39

XMLStreamWriter writeAttribute method throws exception when a colon ':' is included in the attribute name

I am getting exception "Invalid name character ':' (code 58)) in name ("xmlns:xsi"), index #5" for the following statement. If I'm doing this wrong, what is the correct syntax to get the output like: xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

writer.writeAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");

Upvotes: 0

Views: 61

Answers (0)

Related Questions