[wpkg-users] [Bug 285] wpkg.xml not valid under some circumstances.
bugzilla-daemon at bugzilla.wpkg.org
bugzilla-daemon at bugzilla.wpkg.org
Tue May 20 19:11:44 CEST 2014
http://bugzilla.wpkg.org/show_bug.cgi?id=285
--- Comment #2 from Keith Jones <k.e.jones at brighton.ac.uk> ---
(In reply to comment #1)
> WPKG uses Microsoft XML framework to read/write XML files. I don't know about
> possible ways to influence its quoting when writing XML files. Moreover I've
> never experienced any issues where WPKG could not read back its own wpkg.xml
> (while wpkg.xml refers to local package database on local machine, written and
> read only by wpkg.js executed locally).
>
> It is not a supported interface to modify the local wpkg.xml within any
> external program. So I do not plan to make any changes there. If you create a
> tool which messes with wpkg.xml on local machine then it's your duty to make it
> compatible and be aware that its format can change any time without further
> notice.
>
> To query wpkg.xml database there are special parameters for wpkg.js to do this.
> You might read wpkg.xml directly but as said this is neither an official
> interface nor will WPKG be modified to support this. Use official query
> interfaces or accept that you need to assure compatibility in 3rd party
> application.
Hi Rainer,
My apologies. I managed to get out and visit the machines. You are absolutely
correct. The actual WPKG.xml (settings file) is correct on all of them!
After a bit of head scratching, I've worked out what was happening. It took a
while though!
I had an errant double quote in a check element that I missed.
e.g.
<check type='file' condition='versionequalto' path='"c:\%prog32%\somepath' etc
So I updated the package to correct it and started getting numbers of machines
give me an error saving the check.
i.e
"Unable to add result of check to settings: Unexpected character in query
string.||check[@type="file" and @condition="versionequalto" and
@path=""-->%<--c:\%prog32%\somepath" and @value="1.0"]"
I wrongly interpreted that as data being *read* by the X-path query. The
reality is, the X-path query itself is constructed using double quotes and was
invalidated by my errant double quote. Effectively, when WPKG ran after having
installed the software, it scanned its cache for stored checks and threw up the
error. I misread that as it having problems reading the WPKG.XML back in.
Sorry!
I found the source though...
Line 5217
attributesClause += "@" + attribute + "=\"" + value + "\"";
Should it be this instead?
attributesClause += "@" + attribute + "='" + value + "'";
I obviously didn't see the wood for the trees there! :-)
Regards,
Keith
PS: The "processing wpkg.xml files" was me trying to be concerned about you
ending up writing new code to "convert" one wpkg.xml file format to another.
:-)
--
Configure bugmail: http://bugzilla.wpkg.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the wpkg-users
mailing list