How to save the modify?

How to save the modify?

Hello!

I have this code:
  1. $(svg).find("title").each(function() {
  2. if ($(this).text() == current_layer_name) {
  3. $(this).next().attr("fill", "#00ff00");
  4. }
  5. });
The question is: how to save the modify into $(svg) ? This returns the list of tags <title>. The svg variable is a xml string.

Excuse my english,
andrea