This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Problem setting XML attribute
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Aug 31, 2010
10:39 AM
Problem setting XML attribute
I have a Basic MSI project. I need to add an attribute to an XML file that I am creating. Everything else in the XML file (nodes/values/etc.) is being set correctly, it's just this one attribute that will not set. I have specified the information in the General Tab for the Element (screen shot attached), but when the file is created, the attribute does not exist.
Help!
Carl.
Help!
Carl.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Aug 31, 2010
02:37 PM
While xmlns="..." looks like an attribute, it's actually a namespace which has deeper repercussions. Assuming your want your XML to look something like
then you need to define a namespace prefix (say tempuri) which maps to http://tempuri.org/..., and put the prefix on your elements: tempuri:Services and tempuri:Service.