Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to merge two xml file. #768

Open
yujack008 opened this issue Jun 24, 2024 · 1 comment
Open

how to merge two xml file. #768

yujack008 opened this issue Jun 24, 2024 · 1 comment
Labels

Comments

@yujack008
Copy link

is any demo to merge two xml file?

@Mingun
Copy link
Collaborator

Mingun commented Jun 24, 2024

It is unclear what you mean under "merge" and the answer will be different based on this. If you just need to insert piece of one document into another, then create two readers and a Writer and write_events from both readers in desired order. The basic example of writing events from one reader in the Readme of this library.

If under the "merge" you mean some sort of what TortoiseGitMerge does, then this is more broad question which is weakly related to XML processing library and more in area of diff and merge algorithms. In general, such algorithms works with tokens and in case of XML quick_xml::events::Event can be such token, but then you will not be able to merge attributes inside element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants