Export multiple SVG layers

How to export multiple layers of an SVG file using xmlstarlet and Inkscape.