Added whitespace after XML editing of an empty element. - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

AnneTheAgile
Posts: 61
Joined: Wed Jun 08, 2011 9:53 pm

Added whitespace after XML editing of an empty element.

hi! we have an odd problem where the XML parser we are using is not eliding whitespace around XML elements. Then an issue comes up because AIP's XML edit function is adding a prefix of CRLF plus 4 blanks before the new substituted text.

Have you seen this before? Is there a workaround I might employ?

I tried having the template file use ampersand-nbsp-semicolon or space or null.
I tried setting AIP's option for the element to use "create element if it doesn't already exist" & "if found, update first matching".
The element itself has two embedded colons and one embedded at-sign, since it is a server and domain specfication. Possibly that is causing the problem.
When a replacement is made of an existing server/domain is done, no prefix whitespace is added, and so that works fine. Our problem is that not all locations have this value, so we need it to start as empty in the template and then become populated.

thank you so much!
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Added whitespace after XML editing of an empty element.

Hello,
Have you seen this before? Is there a workaround I might employ?
Not really sure what's going on. Can you please send us a test case to replicate this behavior along with the needed dummy resources(.AIP, XMLs, etc.) to support at advancedinstaller dot com? Once we see exactly what you mean we'll be able to give you an informed answer.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
AnneTheAgile
Posts: 61
Joined: Wed Jun 08, 2011 9:53 pm

Re: Added whitespace after XML editing of an empty element.

Thank you! I was out a few days, I just wrote up the sample and sent it to you. Also I was able to reproduce the search issue I had and told you about that.
AnneTheAgile
Posts: 61
Joined: Wed Jun 08, 2011 9:53 pm

Re: Added whitespace after XML editing of an empty element.

I was able to fix our parsing method in the code quite easily, so this item may be of interest for posterity, but I am ok now.
AnneTheAgile
Posts: 61
Joined: Wed Jun 08, 2011 9:53 pm

Re: Added whitespace after XML editing of an empty element.

Mihai reported back they could replicate my problem now, so there may be a fix in the future.

Return to “Common Problems”