While ChatGPT is pretty impressive every time I try to generate code with it it has subtle problems. Basically you already have to be an expert in the domain to be able to spot them.
That makes me weary of using ChatGPT for stuff I'm not an expert in. But isn't that the whole point of ChatGPT?
See for example these interactions with ChatGPT and Java XML parsing (with SAX).
I've had similar experiences when trying to port Oracle SQL dialect to ANSI SQL / PostgreSQL dialect.