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

Writer concept is not flexible enough #13

Open
wilzbach opened this issue Jan 28, 2018 · 1 comment
Open

Writer concept is not flexible enough #13

wilzbach opened this issue Jan 28, 2018 · 1 comment

Comments

@wilzbach
Copy link
Member

From @Ingrater on November 2, 2016 15:44

I have a xml document that looks like this

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <source>
    <Item>Text1</Item>
    <Item>Text2</Item>
  <source>
<root>

The current writer concept does not allow formatting the document in this style. "afterNode" will be called always, even after text nodes. There is no context given to "afterNode" so its impossible to decide whether or not to place a newline. The same goes for the indentation. The writer concept should be extended to allow for this style of formatting (as its very common)

Copied from original issue: lodo1995/experimental.xml#37

@wilzbach
Copy link
Member Author

From @lodo1995 on November 2, 2016 17:10

You are right. The hooks are not complete. I need to find the best balance between having the maximum customization and keeping the number of hooks reasonable.

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

No branches or pull requests

1 participant