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

Added helper functions to render XML elements #48

Merged
merged 1 commit into from May 5, 2015

Conversation

k0ral
Copy link
Collaborator

@k0ral k0ral commented Apr 30, 2015

Text.XML.Stream.Parse provides helpers like tag, content and requireAttr, to avoid dealing with bare Events.
On the other side, Text.XML.Stream.Render provides no such tools. This PR tries to fill the gap (also, stylish-haskell went by :) ).

I'm not expecting it to be merged as is, this is somewhat a draft version, please let me know of the adjustments you would require before merging. Some points worth discussing:

  • the naming convention: tag, optionalAttr and content will conflict with their parsing homonyms, do we really want that ?
  • can we do better/simpler than the Attributes wrapper ?
  • does it make sense to provide optionalAttr ?
  • can we improve on the haddock ?

@snoyberg
Copy link
Owner

snoyberg commented May 1, 2015

I very rarely have a need anymore to generate XML in a streaming manner, so I don't have many thoughts on this. The PR looks good enough to me as-is. I don't have any feedback for you right now; would you make whatever changes you'd like and ping me when it's ready, and I'll merge it in?

@k0ral
Copy link
Collaborator Author

k0ral commented May 5, 2015

I've spent some time testing the new functions, they are working fine so I won't push further changes, you can merge it.
Also, could you please make a new release out of it ? I'm depending on the new functions on some projects.
Thank you.

snoyberg added a commit that referenced this pull request May 5, 2015
Added helper functions to render XML elements
@snoyberg snoyberg merged commit 5620b64 into snoyberg:master May 5, 2015
@snoyberg
Copy link
Owner

snoyberg commented May 5, 2015

Merged and released to Hackage and 1.2.5, thanks!

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.

None yet

2 participants