simplexml icon indicating copy to clipboard operation
simplexml copied to clipboard

Check tags existed or not by name

Open ntvinhdev opened this issue 8 years ago • 0 comments

Sometimes I got xml files that contain self-closing tag like <element /> in order to indicate whether the data is checked at element. I checked the docs, but I found no way to check that tag is existed or not. To deal with that, I must define one empty object and use @Element() above the attribute using my object type. So my question is do we any ways to check tags existed or not by name? If not, do we have any better solutions than mine?

Many thanks.

ntvinhdev avatar Jan 08 '18 00:01 ntvinhdev