Closed b7kich closed 1 year ago
Current implementation of the callback API is similar to a stream. It is not possible to keep references to arbitrary nodes, as what information is kept about individual nodes is lost when they are serialized. This is emphasized clearly in the docs. Please see: https://oozcitak.github.io/xmlbuilder2/builder-functions-with-callbacks.html#createcb
Describe the bug new nodes aren't added to the element you refer to but to wherever the pointer currently is in the node tree, i.e. the latest element or it's parent(s) depending on the number of up() calls
To Reproduce See https://codesandbox.io/s/serverless-morning-gj0qou
Expected behavior regular and callback xml should be the same
Version:
Additional context Add any other context about the problem here.