John, Thanks. I removed the encoding section and it worked. I have been banging my head for 3 weeks on this issue.
Much appreciate the help. Lizette -----Original Message----- >From: Lizette Koehler <[email protected]> >Sent: Jun 10, 2017 3:35 PM >To: [email protected] >Subject: Re: Help with invalid XML code issue > >John, > >Thanks I will try both variations and see if either works. > >The vendor is trying to create a non-mainframe universal one-size fits all >installation process, that you would then load up to the mainframe. > >So they want to be able to have their customers install on Windows, Linux, >AIX, mainframe, etc. But just have one installation process be able to run on >them all. I have been strictly working with the installation process from OMVS >and it has provided some interesting challenges. > > >Lizette > > >-----Original Message----- >>From: John McKown <[email protected]> >>Sent: Jun 10, 2017 2:48 PM >>To: [email protected] >>Subject: Re: Help with invalid XML code issue >> >>On Sat, Jun 10, 2017 at 4:26 PM, Lizette Koehler <[email protected]> >>wrote: >> >>> I am not unix or xml savvy. So any guidance will be appreciated. >>> >>> I was supplied with an xml file to use to install a product. When it runs >>> it fails with the following error message. This is done on the mainframe >>> in the OMVS function. >>> >>> SEVERE: java.text.ParseException: javax.xml.stream.XMLStreamException: An >>> invalid XML character (Unicode: 0x4c) was found in the prolog of the >>> document. >>> >>> the first few lines of the XML are: >>> >>> >>> <?xml version="1.0" encoding="UTF-8"?> >>> <Metadata> >>> <Group Id="$group:1" Name="SAS Plan File for Company Name" Desc=""> >>> <Properties> >>> <Property Id="$grpprop:1" Name="AsOfDate" DefaultValue="2017-02-22" >>> /> >>> <Property Id="$grpprop:2" Name="ConfigDirectory" >>> DefaultValue="Config" /> >>> >>> it is very long xml, over 3600 lines of code. >>> >>> I am thinking it may have something to do with the code page for my PC or >>> maybe the CUNI for LE. Not sure. >>> >>> Also, when I have the xml on my PC it looks fine, when I transferred it up >>> to the mainframe it looked wrapped. Should it be more line items or >>> wrapped for it to work? Just curious. It was suggested to go into wordpad >>> and then save it. Then the wrap on the mainframe would be more line items >>> (code). Does that create any issues? >>> >>> >>> >>> So any thoughts? >>> >>> Thanks >>> >>> Lizette >>> >>> >>Hum, 0x4c in UTF-8 is an "L". In EBCDIC CP-037 (et al.) it is a "<". If >>you look at the first line: >> >> >><?xml version="1.0" encoding="UTF-8" ?> >> >>the phrase: encoding="UTF-8" says that the rest of the data is in UTF-8. >>But it's actually in EBCDIC. So the XML parser "sees" the "<" (in EBCDIC, >>this is 0x4c, as in error) as a UTF-8 value of "L", which is not what it >>wants at this point. >> >>I'm not totally sure, but I think you need the first line to look like: >> >><?xml version="1.0" encoding="IBM037" ?> >> >>or maybe even just, leaving off the encoding entirely, >> >><?xml version="1.0" ?> >> >>a good source of information on XML on z/OS: >>http://www.redbooks.ibm.com/redbooks/pdfs/sg247810.pdf section 1.4 on >>"Encoding". >> >> >>-- >>Veni, Vidi, VISA: I came, I saw, I did a little shopping. >> >>Maranatha! <>< >>John McKown >> ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
