Hi Marc,
Really sorry. I am not trying to post my questions multiple times. If it had happened by mistake, please excuse me. I was not sure, whether to post it as a question or an issue. Please excuse me. I really appreciate the work done by you and I am extremely thankful for your contribution to the community.
I did try to use a jQuery plugin (jQuery.base64.min.js) for converting my string to stream. The following is my sample XML, which I am trying to convert, so that I can create a file in a Share Point library and add the following content, using CopyIntoItems method. This XML is generated using another method. I have just given a sample here.
string str = "<SampleSets>
<SampleSet id="some_guid" Name="SS1">
<Sample id="some_guid" Name="S10">
<Sample id="some_guid" Name="SubS10"></Sample>
</Sample>
<Sample id="some_guid" Name="S20">
<Sample id="some_guid" Name="SubS20"></Sample>
</Sample>
</SampleSet>
<SampleSet id="some_guid" Name="SS2">
<Sample id="some_guid" Name="S11">
<Sample id="some_guid" Name="SubS11"></Sample>
</Sample>
<Sample id="some_guid" Name="S21">
<Sample id="some_guid" Name="SubS21"></Sample>
</Sample>
</SampleSet>
</SampleSets>"
Really sorry. I am not trying to post my questions multiple times. If it had happened by mistake, please excuse me. I was not sure, whether to post it as a question or an issue. Please excuse me. I really appreciate the work done by you and I am extremely thankful for your contribution to the community.
I did try to use a jQuery plugin (jQuery.base64.min.js) for converting my string to stream. The following is my sample XML, which I am trying to convert, so that I can create a file in a Share Point library and add the following content, using CopyIntoItems method. This XML is generated using another method. I have just given a sample here.
string str = "<SampleSets>
<SampleSet id="some_guid" Name="SS1">
<Sample id="some_guid" Name="S10">
<Sample id="some_guid" Name="SubS10"></Sample>
</Sample>
<Sample id="some_guid" Name="S20">
<Sample id="some_guid" Name="SubS20"></Sample>
</Sample>
</SampleSet>
<SampleSet id="some_guid" Name="SS2">
<Sample id="some_guid" Name="S11">
<Sample id="some_guid" Name="SubS11"></Sample>
</Sample>
<Sample id="some_guid" Name="S21">
<Sample id="some_guid" Name="SubS21"></Sample>
</Sample>
</SampleSet>
</SampleSets>"
var strm = $.base64.encode(str);
strm = strm.replace(/ /g, '');
$().SPServices({
operation: "CopyIntoItems",
webURL: webUrl,
processData: false,
async: false,
SourceUrl: "",
Stream: strm,
DestinationUrls: [webUrl + "/Documents/FileName.xml"],
completefunc: function (xData, Status) {
debugger;
alert("Status=" + Status + " XML=" + xData.responseXML.xml);
}
});