Page 1 of 1

Get XML: Needed functionality

Posted: Wed Aug 10, 2011 6:04 pm
by m.duchesneau
Hi,

The new XML read/write feature is great.

However, there are limitations to the Get XML command that obligates me to use much less stellar ways to get my information.

More specifically, it does not allow me to parse the information from the following block:

Code: Select all

<appSettings>
    <add key="DataPathURL" value="http://SERVERUPLOADURL/MediaUpload/" />
    <add key="notifyTimer" value="600000" />
    <add key="DataPath" value="SERVERUPLOADPATH\MediaUpload\" />
    <add key="MailQuota" value="10" />
    <add key="MailProtocol" value="HTTPS" />
    <add key="UseProxy" value="USEPROXYVALUE"/>
    <add key="ProxyUrl" value="PROXYURLVALUE:PROXYPORTVALUE"/>
    <add key="ProxyDefaultCredential" value="PROXYDEFAULTCREDENTIALVALUE"/>
    <add key="ProxyLogin" value="PROXYLOGINVALUE"/>
    <add key="ProxyPassword" value="PROXYPASSWORDVALUE"/>
  </appSettings>
</configuration>
The reason being, I can only decide to get an attribute from a path, but never according to another attribute (in this case, I want the 'value' attribute in accordance to what is found in the 'key' attribute)

To work around that, I decided to just get the 'value' attribute from the configuration\appSettings\add path, which is supposed to result in putting all the found values in one string separated by $NEWLINE$. Assuming that the order or number of keys will never change (which is not a given), this would have been ok.

However, some of these values will be empty sometimes (example: <add key="ProxyPassword" value=""/> ). When this happens, the value is skipped altogether! How am I expected to go around and follow the preset order if some values are actually skipped!

Another thing I noted, the values seem to be fetched in the reverse order (i.e. from ProxyPassword to DataPathURL). What's up with that?

Thanks for your help and consideration,
Mathieu

Re: Get XML: Needed functionality

Posted: Thu Aug 11, 2011 3:24 pm
by giaviv
Dear Mathieu,

Thank you very much for your input. We will try and make this a feature in future versions.