RazrFalcon / roxmltree

Represent an XML document as a read-only tree.
Apache License 2.0
434 stars 37 forks source link

Less than usefull Debug output for Element #87

Closed kaj closed 1 year ago

kaj commented 1 year ago

From roxmltree 0.15 to 0.16, the Debug output for Element changed from including the element name, attributes and namespaces to something similar but with an added virtual doc attribute including debug info for the entire document. This changes diagnostic output in my program from a line of easy-to-digest text to thousands of not very comprehensible lines (my input xml in an example is 750 lines, which translates to 4559 lines (235 kB) out error message).

Is it possible to change this behaviour from code using roxmltree? Would you accept a patch for skipping the doc virtual attribute in Debug formatting?

RazrFalcon commented 1 year ago

Are you sure? roxmltree does not have an Element type to begin with and the Node one has a proper, custom debug.

RazrFalcon commented 1 year ago

Oh, I see. We have to update Attributes and Namespaces iterators formatting. Will take a look.

kaj commented 1 year ago

Yes, it seems to be Attributes for Node of NodeKind::Element that contains the document. So a custom debug for Attributes instead of the derived would probably help.