<p>I need to parse variety of XMLs that can look like this (simplified):</p>
<p><configuration> <connections> <add key="foo" connection="bar" /> </connections> <appSetting> <add name="foo" value="bar" /> ... </appSetting></p>
<pre><code>others that are specific to some other XMLs
</code></pre>
<p>I am interested in collecting the file path+filename,xml attributes and values and transforming it all to simple json { "k":"v"}.</p>
<p>To me the easiest way would be to use something like this <a href="https://github.com/clbanning/mxj" rel="nofollow">https://github.com/clbanning/mxj</a></p>
<hr/>**评论:**<br/><br/>Savedya: <pre><p>Feel free to use whatever libraries you want, but you can do this with the standard library pretty easily.</p>
<p><a href="https://play.golang.org/p/BPLxVI8E1H" rel="nofollow">https://play.golang.org/p/BPLxVI8E1H</a></p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传