I want to copy the data from text area and want to create a XML using that data in Jquery.
To copied it from text area i wrote the following code in Jquery:
<script type="text/javascript">
function paste_data() {
var text = $('#all').val();
alert(text);
}
</script>
// all is the id of the text area.
When i print the data it shows me in following format:
406450 8 first
43333 89 second
987 90 third-fourth
Now i want to create a XML using the above data in javascript or Jquery using the following format. So that i can use it further.
<row dc = "406450" al="8" msg="first" />
<row dc = "43333" al="89" msg="second" />
<row dc = "987" al="90" msg="third-forth" /> ....and so on
I don't know whether it is possible or not, but what about the split function?