XMLCoder icon indicating copy to clipboard operation
XMLCoder copied to clipboard

Error thrown when decoding multiple attributes

Open Joebayld opened this issue 3 years ago • 3 comments

Does this library support multiple attributes?

Decoding something like this throws an error.

<MyObject>
    <Item id="1" value="ok">Hello</Item>
    <Item id="2" name=”not-ok”>Goodbye</Item>
</MyObject>

The error thrown is "Error Domain=NSXMLParserErrorDomain Code=111 "(null)""

Any ideas?

Joebayld avatar Jun 18 '22 03:06 Joebayld

did you manage to resolve this issue ? I am also facing the same issue.

SwapnilNighot avatar Oct 17 '22 15:10 SwapnilNighot

FWIW, I thought I had this issue, to the point that I forked the project and began adding a test to find the problem. But the test passed—lots of attributes, all good. So I pasted my XML into the test and it failed.

It turned out I had an extraneous comma (,) between a couple elements.

With that sorted, my current project is parsing elements with dozens of attributes and child elements, no problem.

Jason-Abbott avatar Nov 16 '22 17:11 Jason-Abbott

I'll leave this open for a bit for @SwapnilNighot . Let me know what the current status is. If it becomes stale for another month or so I'll close it.

Joannis avatar Nov 16 '22 21:11 Joannis