0

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");

Arun
  • 39
  • 1
  • 3
  • 9
  • 1
    You need to use one of the other `writeAttribute` methods (either the 3 string or 4 string variant). However, it looks like you're registering a namespace, then you should use `writeNamespace` instead. – Mark Rotteveel Nov 29 '22 at 08:46
  • Thanks @MarkRotteveel writeNamespace() resolved my issue. – Arun Nov 30 '22 at 07:28

0 Answers0