Click here to Skip to main content
15,886,199 members

Comments by Sriram Mani (Top 33 by date)

Sriram Mani 19-Aug-15 2:23am View    
Thanks for the solution Maciej. The solution which Richard provided earlier in this post actually worked fine in my scenario.
Sriram Mani 18-Aug-15 3:21am View    
Oops. Sorry Richard. My bad. I tried as xmlData.RemoveNodes() rather than nodes.RemoveNodes(). This actually works. Thanks for the solution!
Sriram Mani 18-Aug-15 2:44am View    
Thanks for the Suggestion Richard. I don't need to remove the nodes. Rather I need to remove the contents (or values) inside the nodes. I already tried with Remove nodes as the first step. But the requirement is to retain the nodes in the same hierarchy and to remove the contents alone. In my case, the contents are binary data which doesn't make any sense to read or to be displayed. But retaining the node is essential, since the node contains information about attachment like the attachment name and size as attributes.

The reason why I used SetElementValue is that I could explicitly set the attachment value to be null clearing the binary data inside attachment nodes and still retains the hierarchy and attributes. But the problem is, it clears the contents of first child alone. I have more than one attachment nodes and comment_attachment nodes inside a parent node, which also should be cleared.
Sriram Mani 18-Aug-15 2:35am View    
Hi Maciej. Sorry if the description made a confusion. I wanted the node's value to be null. Not the node's name to be null. Suppose for Ex: <attachment name="blahblah.doc">xxxxxxxxxyyyyy....xxxyyy</attachment>. I want it to be <attachment name="blahblah.doc"></attachment>

Sriram Mani 20-Jun-15 5:27am View    
I'm trying to attach a file to my application by using the "Open with"(Right click on a file and use the Open with option to open the file with our application) feature. I have added the code to handle this event. But the share target event is not triggered. So Im not sure whether the ShareTarget event can be used in Windows Surface app.