Skip to content

Conversation

@heuristic-machina
Copy link

Purpose / Goal

This PR adds documentation to XMLBuilder explaining how to safely round-trip XML → JSON → XML when XML declarations are present.

It highlights:

  • Using ignoreDeclaration: true during parsing (recommended)
  • Manually removing the ?xml node before building (fallback option)

This addresses the user confusion described in Issue #774 by documenting expected behavior and recommended configuration.

Non-goal: This PR does not change parser or builder behavior.

Type

Please mention the type of PR

  • Docs improvement
  • Usage clarification
  • DX enhancement

Specifically:

  • Clarifies expected behavior
  • Explains correct configuration
  • Prevents future confusion and duplicate issues
  • Documents a known edge case of XML ↔ JSON round-tripping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant