Tell me, how can I get the path from the svg file?

For example, there is such a file:

<svg height="205px" version="1.1" viewBox="0 0 205 205" width="205px" xmlns="http://www.w3.org/2000/svg"> <path d=" M 0.00 0.00 L 49.47 0.00 C 35.55 0.87 22.07 7.38 12.95 17.97 C 5.37 26.51 0.95 37.59 0.00 48.93 L 0.00 0.00 Z" fill="#ffffff" /> <path d=" M 49.47 0.00 L 56.06 0.00 C 68.59 1.01 80.77 6.39 89.62 15.37 C 98.72 24.36 104.19 36.76 105.00 49.50 L 105.00 56.06 C 103.97 68.84 98.39 81.25 89.11 90.14 C 80.17 98.92 68.02 104.19 55.54 105.00 L 48.95 105.00 C 36.40 103.99 24.22 98.60 15.36 89.61 C 6.27 80.63 0.81 68.24 0.00 55.51 L 0.00 48.93 C 0.95 37.59 5.37 26.51 12.95 17.97 C 22.07 7.38 35.55 0.87 49.47 0.00 Z" fill="#243c82" /> <path d=" M 56.06 0.00 L 105.00 0.00 L 105.00 49.50 C 104.19 36.76 98.72 24.36 89.62 15.37 C 80.77 6.39 68.59 1.01 56.06 0.00 Z" fill="#ffffff" /></svg> 

Need each path separately.

  • And what's the problem, getting somehow programmatically? or you do not know how to copy and paste to another file? - Shwarz Andrei
  • hmm .... of course programmatically! I have the code: ImageView imageView = (ImageView) getActivity (). FindViewById (R.id.svg_image); Sharp.loadResource (getResources (), R.raw.wheel) .into (imageView); - grosha
  • I use this libu . . . But there is no such possibility in it. Maybe someone knows some libraries in which there is such a method. - grosha
  • 2
    I don’t know that the first thing that comes to my mind is to declare an XmlPullParser to load the xml ku, go over the path tags, and pull all the path into the String array. Perhaps there is a simpler way, but I do not know. - Shwarz Andrei
  • Here you can, like, restrict yourself to a substring from <path d=" to the next. " Removing after finding found. - Yuriy SPb

0