[wpkg-users] How to identify malformed XML

Jason Taylor jtaylor at morrislaing.com
Thu Apr 11 18:48:34 CEST 2013


Ah. I am blind. Thank you very much! Now, to find a ST plugin to do this.

> -----Original Message-----
> From: Geoff Brown [mailto:geoffrey at sfu.ca]
> Sent: Thursday, April 11, 2013 11:46 AM
> To: Jason Taylor
> Cc: wpkg-users at lists.wpkg.org
> Subject: Re: [wpkg-users] How to identify malformed XML
> 
> Use Notepad++ and enable its' XML syntax checker. It will save you tons of
> frustration.
> 
> ---
> Geoff Brown
> IT Services, SFU Surrey Campus
> 
> 
> On Apr 11, 2013, at 9:38 AM, Jason Taylor 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




More information about the wpkg-users mailing list