cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
danitaj
Level 2

XML import of filename with dash (-) error

I'm trying to import a xml file by the name of 'sys-props.xml'. An error pops up stating:

"Field "Component_" of table "ISXmlFile": An invalid identifier was supplied.
The field may contain letters, digits, underscores (_), or periods (.). The field must begin with a letter or and underscore.

If I remove the dash '-' from the filename, the file imports with no problem. It's not impossible to have the name changed, but will mess up our source control to do it and there are many files with a similar format that i need to import. I'm trying to find out if there's something i've not set up properly or some other way to import the files into the XML File Changes view.
Labels (1)
0 Kudos
(3) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

The behavior you report sounds like a bug in InstallShield, but I was unable to reproduce it on my machine (in our internal development version, which should be comparable to IS2010 here). You might try evaluating IS2010 to see if the problem is resolved for you there.

However, let me discourage you from using the import option with any frequency. If you are trying to install an XML file, install it as a file. If you are trying to make small changes to an XML file, especially if it's a large file, install it as a file first and then tweak just the parts you need to change with the XML Changes view. Any other approach is not well-suited for preserving any desired ordering your file may have.
0 Kudos
danitaj
Level 2

Thank you for your prompt reply. I originally tried this scenerio in Installshield 12 with the same results which is one of the reasons we upgraded to 2009 (not the only reason). I have a coworker running 2010 and will ask her to test it as well to see if there is any difference. She just tried with the same error message popping up.

I'm trying to import it (only importing a few of the elements) to set a few attributes to user input values. I'm setting the values to , for example, then using the file and string functions of installscript to dynamically change them to the user input values, as suggested by the documentation. But if I can't import the values or if the component cannot be tied with the original filename (if i import the values with the changed filename), then i'll have to find a different way to do this, possibly using MSXML document object.
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

If it's only a few elements, it shouldn't be a problem to just create them manually by right clicking on the file node, then the root element node, etc., and choosing to create the elements. Don't let the import problem tie you up too long.
0 Kudos