My Tips and Tricks for C#, C, C++, MatLAB, Java, LaTeX, Python and more!
Showing posts with label xml. Show all posts
Showing posts with label xml. Show all posts
Tuesday, April 28, 2020
Need <, >, & in an XML-Message? Use the XML escape characters!
For Errors like this in SoapUI?
Name cannot begin with the ' ' character, hexadecimal value 0x20.
Then please try escaping the critical characters!
Have a look here:
https://stackoverflow.com/questions/1091945/what-characters-do-i-need-to-escape-in-xml-documents
" "
' '
< <
> >
& &
https://validator.w3.org/#validate_by_input
Friday, April 26, 2019
C# Defining Application/User Settings: appSettings Vs. ApplicationSettings
Basically there are two WAYs to define settings for a C# Application:
Manually update the app.config xml file (and access the properties via ConfigurationManager.AppSettings["key1"]; )
Or you can Select your Project, then Properties and Settings:
( access the properties in the code with Properties.Settings.Default.TestEnvironment)
Manually update the app.config xml file (and access the properties via ConfigurationManager.AppSettings["key1"]; )
<appSettings>
<add key="key1" value="value1"/>
<add key="key2" value="value2"/>
</appSettings>
Or you can Select your Project, then Properties and Settings:
( access the properties in the code with Properties.Settings.Default.TestEnvironment)
<applicationSettings>
<Projectname.Properties.Settings>
<setting name="TestEnvironment" serializeAs="String">
<value>True</value>
</setting>
</Projectname.Properties.Settings>
</applicationSettings>
References:
Subscribe to:
Posts (Atom)