Quantcast
Channel: Indigo Rose Software Forums - Forums
Viewing all articles
Browse latest Browse all 2105

Dealing with complex XML structures

$
0
0
I am having the devil of the time using the XML functions to parse and/or update an XML script. For example, here are the first few lines. I am trying to retrieve and/or update the name of the SQL Server and database.

Code:

<?xml version="1.0"?>
<configuration>
  <appSettings>
    <add key="SQLServer" value="NEWDEV6\SQLEXPRESS" />
    <add key="Database" value="NLM" />
  </appSettings>

For example, is "SQLServer" an Attribute, an Element or a Value? Same for "NEWDEV6\SQLEXPRESS". I have tried treating them all different ways with no luck.

Can someone give me an example of how I would retrieve:
  • Name of the SQL Server instance
  • Name of the database

Similarly, an example of how I would update:
  • Name of the SQL Server instance
  • Name of the database

I have ended up parsing the file with String functions, but I know that is not the way to do it. I am using the latest SUF: 9.5.

Thanks.

Viewing all articles
Browse latest Browse all 2105

Trending Articles