This project has moved and is read-only. For the latest updates, please go here.

Read configuration element data that is not in an attribute?

Mar 23, 2013 at 2:50 PM
I have an optional element hanging off my configuration called cnfNotes; my intention is to have this node basically be a free text field like so:
<account id="someid" name="somename" ...>
    <bankInfo id="someid" name="somename"... />
        blah blah blah...
...but I cannot figure out how to access this value programmatically. Is this not supported?
Apr 8, 2013 at 11:57 AM
It would be also nice if CSD would allow to use CData elements.

I found sample implementation here
Sample article
Apr 8, 2013 at 12:34 PM
Ok I missed that this is currently possible by setting flag "Has Custom Child Elements" to true.
If I have for example configuration element named OperationElement with such flag I have to write partial class
public partial class OperationElement
    public string Script { get; set; }
    private bool HandleUnrecognizedElement(string elementName, global::System.Xml.XmlReader reader)
        this.Script = reader.ReadString();
        return true;
And all works as expected
Feb 26, 2014 at 2:29 PM
+1 for element text from body