You aren't working with values, but with attributes. You won't be using XML.GetValue() or XML.SetValue() for setting or retrieving the data in the XML you provided. In the help file, there is a chapter explaining XML values, attributes, etc. - it explains these notions much better than I could possibly do here.
Ulrich
Announcement
Collapse
No announcement yet.
Dealing with complex XML structures
Collapse
X
-
Thanks, Ulrich. That seems to do it. Although I can't say I really understand it.
You are only using GetAttribute and SetAttribute. Where would something like GetValue or SetValue be used in this situation?
Leave a comment:
-
Dealing with complex XML structures
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>
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.
Leave a comment: