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

SVG Decoder #14

Closed
jwittenbach opened this issue Oct 29, 2016 · 4 comments
Closed

SVG Decoder #14

jwittenbach opened this issue Oct 29, 2016 · 4 comments

Comments

@jwittenbach
Copy link

Is there any way to decode an SVG file (fetched as text) into the SVG nodes in this package? If not, are there any plans to add this?

@evancz
Copy link
Member

evancz commented Oct 30, 2016

There's no SVG parser as part of this library. Can you outline your usage scenario? We don't add features without a concrete example of why it's a good idea.

@evancz evancz closed this as completed Oct 30, 2016
@jwittenbach
Copy link
Author

Sure thing. I've been playing around with using this package to programmatically create SVG, and it works great. But I frequently create SVG content offline which I then want to use in a webpage. In JS, I use XHR to fetch it. Then I can add event handlers finally add it as an <svg> node. In Elm, the best I can do is fetch it as text, but then I have no way to parse it into a form that would be useable by this package. Seems like it might be a generally useful piece of functionality, similar to the great JSON decoding tools that exist in Elm.

@process-bot
Copy link

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

@evancz
Copy link
Member

evancz commented Nov 2, 2016

Sorry about the robot, it got out of whack for a little while!

It sounds like an XML decoder may be the thing you are looking for? It should cover this case right? Like, someone could make an SVG specific thing on top of an XML decoder.

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

3 participants