Closed schulzer closed 10 months ago
Do you need this often? This seems like it's not something that should be useful super frequently because you either know the expected type of a given node or, if you're writing a function that expects arbitrary node types, you'd need to process the rest of the node data in a way that depend on the type (eg elements have names, pcdata nodes have values) in which case I'm not sure a function like the above is super helpful.
Yes and no. I use it mainly for tracing/debugging during development and think it is very handy. If I would write generic function I would use direct xml_node_type
for switching/ifelse instead of the text based version, agreed anything else wouldn't be very plausible.
Ok - this feels like something that's very easy to provide in a separate header, and doesn't obviously match any other existing functionality in pugixml so it would probably make sense to keep it separate.
Hi, thanks for a great lib!
could something like this added to your header? Or such a helper function considered too much bloat? I know I could simply write a wrapping header which includes your lib as well as contains this function which I could include anywhere else.