[wpkg-users] How to identify malformed XML

Carl van Eijk carl.vaneijk+wpkg at gmail.com
Thu Apr 11 18:51:29 CEST 2013


Jason,

In the past when I've had a similar problem I've opened the XML in IE,
which  I think will complain about an error on a specific line. Worth a
shot.

Carl


On 11 April 2013 17:38, Jason Taylor <jtaylor at morrislaing.com> wrote:

> Sometimes, after editing a package definition, wpkg will start complaining
> about malformed XML and no root elements. Could anyone give me some
> pointers on how to identify where the problem is? In my editor (ST2) it
> doesn't show any inconsistent highlighting or anything that screams
> "invalid XML!"
>
> The last couple times this happened, I just re-wrote the file from scratch
> and the problem went away. I would rather find out what I'm doing wrong
> than re-writing it every time this happens.
>
> These are the debug messages I'm getting:
> ---
> Error parsing xml
> '//domain/it/software/wpkg/packages/WorkshareProfessional.xml': The
> stylesheet does not contain a document element.  The stylesheet may be
> empty, or it may not be a well-formed XML document.
> No root element found in
> '//domain/it/software/wpkg/packages/WorkshareProfessional.xml'.
> ---
>
> And here is the package definition in full:
> ---
> <?xml version="1.0" encoding="UTF-8"?>
> <packages xmlns:packages="http://www.wpkg.org/packages" xmlns:wpkg="
> http://www.wpkg.org/wpkg" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"     xsi:schemaLocation="
> http://www.wpkg.org/packages xsd/packages.xsd">
>
>         <package id="WorkshareProfessional" name="Workshare Professional"
> revision="201304040">
>
>                 <!-- Current version -->
>                 <variable name="WORKSHAREVERSION" value="7.50.15000.1000"
> />
>
>                 <variable name="WORKSHAREOPTIONS"
> value="Workshare_Options_x64.reg">
>                         <condition>
>                                 <check type="host" type="architecture"
> value="x64" />
>                         </condition>
>                 </variable>
>
>                 <variable name="WORKSHAREOPTIONS"
> value="Workshare_Options_x86.reg">
>                         <condition>
>                                 <check type="host" type="architecture"
> value="x86" />
>                         </condition>
>                 </variable>
>
>                 <!-- Always consider this package installed -->
>                 <check type="file" condition="exists"
> path="%WINDIR%\explorer.exe" />
>
>                 <upgrade cmd='msiexec /qn /i
> "%SOFTWARE%\Workshare\Professional\Professional.msi"'>
>                         <condition>
>                                 <check type="uninstall"
> condition="versionsmallerthan" path="Workshare Professional"
> value="%WORKSHAREVERSION%" />
>                         </condition>
>                 </upgrade>
>
>                 <upgrade cmd='msiexec /qn /i
> "%SOFTWARE%\Workshare\Professional\WorksharePdfConverter.msi"'>
>                         <condition>
>                                 <check type="uninstall"
> condition="versionsmallerthan" path="Workshare Professional"
> value="%WORKSHAREVERSION%" />
>                         </condition>
>                 </upgrade>
>
>                 <upgrade cmd='%COMSPEC% /c copy
> "\\mlebk.local\it\software\Workshare\Professional_Perm.lic"
> "%PROGRAMFILES(X86)%\Workshare\Modules\"'>
>                         <condition>
>                                 <check type="uninstall" condition="exists"
> path="Workshare Professional" />
>                         </condition>
>                 </upgrade>
>
>                 <upgrade cmd='%COMSPEC% /c regedit /S
> "%SOFTWARE%\Workshare\%WORKSHAREOPTIONS%"'>
>                         <condition>
>                                 <check type="uninstall" condition="exists"
> path="Workshare Professional" />
>                         </condition>
>                 </upgrade>
>
>                 <upgrade cmd='%COMSPEC% /c
> "%PROGRAMFILES(X86)%\Workshare\Modules\WMConfigAssistant.exe" /install
> /silent'>
>                         <condition>
>                                 <check type="uninstall"
> condition="versionsmallerthan" path="Workshare Professional"
> value="%WORKSHAREVERSION%" />
>                         </condition>
>                 </upgrade>
>
>         </package>
>
> </packages>
> ---
>
> This package definition broke after I added the two WORKSHAREOPTIONS
> variable assignments, and the regedit upgrade command. I don't see anything
> wrong with those items, though. I don't think it's a file encoding problem
> as this, and all other, files are UTF-8.
>
> Any advice on finding out what's wrong here would be greatly appreciated!
>
>
> Jason Taylor
> Morris, Laing, Evans, Brock & Kennedy
> 300 N Mead Ste 200
> Wichita, KS 67202
> 316-262-2671
> jtaylor at morrislaing.com
>
> -------------------------------------------------------------------------
> wpkg-users mailing list archives >>
> http://lists.wpkg.org/pipermail/wpkg-users/
> _______________________________________________
> wpkg-users mailing list
> wpkg-users at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/wpkg-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20130411/deac8434/attachment-0003.html>


More information about the wpkg-users mailing list