[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: should this be well-formed?
I agree it's not well formed, but I'm not having a problem with it. This one is, when processed by my application, performing fine. The one that the application is having a problem is this one, which I figure is well-formed: <= Recv data, 565 bytes (0x235) 0000: 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 <?xml version="1 0010: 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 55 54 .0" encoding="UT 0020: 46 2d 38 22 3f 3e 0a 3c 6b 6d 6c 20 78 6d 6c 6e F-8"?>.<kml xmln 0030: 73 3d 22 68 74 74 70 3a 2f 2f 65 61 72 74 68 2e s="http://earth. 0040: 67 6f 6f 67 6c 65 2e 63 6f 6d 2f 6b 6d 6c 2f 32 google.com/kml/2 0050: 2e 31 22 3e 0a 3c 44 6f 63 75 6d 65 6e 74 3e 0a .1">.<Document>. 0060: 20 20 3c 6e 61 6d 65 3e 4e c3 a6 72 75 6d 3c 2f <name>N..rum</ 0070: 6e 61 6d 65 3e 0a 20 20 3c 64 65 73 63 72 69 70 name>. <descrip 0080: 74 69 6f 6e 3e 3c 21 5b 43 44 41 54 41 5b 5d 5d tion><![CDATA[]] 0090: 3e 3c 2f 64 65 73 63 72 69 70 74 69 6f 6e 3e 0a ></description>. 00a0: 20 20 3c 53 74 79 6c 65 20 69 64 3d 22 73 74 79 <Style id="sty 00b0: 6c 65 31 22 3e 0a 20 20 20 20 3c 49 63 6f 6e 53 le1">. <IconS 00c0: 74 79 6c 65 3e 0a 20 20 20 20 20 20 3c 49 63 6f tyle>. <Ico 00d0: 6e 3e 0a 20 20 20 20 20 20 20 20 3c 68 72 65 66 n>. <href 00e0: 3e 68 74 74 70 3a 2f 2f 6d 61 70 73 2e 67 6f 6f >http://maps.goo 00f0: 67 6c 65 2e 63 6f 6d 2f 6d 61 70 66 69 6c 65 73 gle.com/mapfiles 0100: 2f 6d 73 2f 6d 69 63 6f 6e 73 2f 62 6c 75 65 2d /ms/micons/blue- 0110: 64 6f 74 2e 70 6e 67 3c 2f 68 72 65 66 3e 0a 20 dot.png</href>. 0120: 20 20 20 20 20 3c 2f 49 63 6f 6e 3e 0a 20 20 20 </Icon>. 0130: 20 3c 2f 49 63 6f 6e 53 74 79 6c 65 3e 0a 20 20 </IconStyle>. 0140: 3c 2f 53 74 79 6c 65 3e 0a 20 20 3c 50 6c 61 63 </Style>. <Plac 0150: 65 6d 61 72 6b 3e 0a 20 20 20 20 3c 6e 61 6d 65 emark>. <name 0160: 3e 4e c3 a6 72 75 6d 3c 2f 6e 61 6d 65 3e 0a 20 >N..rum</name>. 0170: 20 20 20 3c 64 65 73 63 72 69 70 74 69 6f 6e 3e <description> 0180: 3c 21 5b 43 44 41 54 41 5b 5d 5d 3e 3c 2f 64 65 <![CDATA[]]></de 0190: 73 63 72 69 70 74 69 6f 6e 3e 0a 20 20 20 20 3c scription>. < 01a0: 73 74 79 6c 65 55 72 6c 3e 23 73 74 79 6c 65 31 styleUrl>#style1 01b0: 3c 2f 73 74 79 6c 65 55 72 6c 3e 0a 20 20 20 20 </styleUrl>. 01c0: 3c 50 6f 69 6e 74 3e 0a 20 20 20 20 20 20 3c 63 <Point>. <c 01d0: 6f 6f 72 64 69 6e 61 74 65 73 3e 31 32 2e 35 33 oordinates>12.53 01e0: 37 37 31 38 2c 35 35 2e 38 31 36 33 33 30 2c 30 7718,55.816330,0 01f0: 2e 30 30 30 30 30 30 3c 2f 63 6f 6f 72 64 69 6e .000000</coordin 0200: 61 74 65 73 3e 0a 20 20 20 20 3c 2f 50 6f 69 6e ates>. </Poin 0210: 74 3e 0a 20 20 3c 2f 50 6c 61 63 65 6d 61 72 6b t>. </Placemark 0220: 3e 0a 3c 2f 44 6f 63 75 6d 65 6e 74 3e 0a 3c 2f >.</Document>.</ 0230: 6b 6d 6c 3e 0a kml>. == Info: Closing connection #0 so I took one that was an example of something working and thought: why the hell is this thing working. it shouldn't be, it's got the little extra character on top that should raise an error. Of course that's a side issue since I still haven't figured out why the second example isn't working, which is some sort of issue regarding proxy server setup. Anyway, just wanted confirmed that what was working shouldn't be, as I'm generally used to things that I think are supposed to be working not doing so rather than the other way around and the switch was somewhat of a bewildering experience. Cheers, Bryan Rasmussen On Thu, Mar 13, 2008 at 11:50 AM, John Snelson <john.snelson@o...> wrote: > Hi Bryan, > > That's not well formed - the first error you should get is because there > is non-whitespace text content outside the document element. > > The next error is that there is a processing instruction that uses the > reserved name "xml" - it doesn't count as an XML declaration unless the > "<" is the first character in the file. > > John > > > > bryan rasmussen wrote: > > Should the following response to a GET be well-formed: > > > > <= Recv data, 423 bytes (0x1a7) > > 0000: 31 39 62 0d 0a 3c 3f 78 6d 6c 20 76 65 72 73 69 19b..<?xml versi > > 0010: 6f 6e 3d 22 31 2e 30 22 20 65 6e 63 6f 64 69 6e on="1.0" encodin > > 0020: 67 3d 22 55 54 46 2d 38 22 3f 3e 3c 6b 6d 6c 20 g="UTF-8"?><kml > > 0030: 78 6d 6c 6e 73 3d 22 68 74 74 70 3a 2f 2f 65 61 xmlns="http://ea > > 0040: 72 74 68 2e 67 6f 6f 67 6c 65 2e 63 6f 6d 2f 6b rth.google.com/k > > 0050: 6d 6c 2f 32 2e 30 22 3e 3c 50 6c 61 63 65 6d 61 ml/2.0"><Placema > > 0060: 72 6b 3e 3c 6e 61 6d 65 3e 4e c3 a6 72 75 6d 2c rk><name>N..rum, > > 0070: 20 44 65 6e 6d 61 72 6b 3c 2f 6e 61 6d 65 3e 3c Denmark</name>< > > 0080: 61 64 64 72 65 73 73 3e 4e 61 65 72 75 6d 2c 20 address>Naerum, > > 0090: 44 65 6e 6d 61 72 6b 3c 2f 61 64 64 72 65 73 73 Denmark</address > > 00a0: 3e 3c 73 74 79 6c 65 55 72 6c 3e 72 6f 6f 74 3a ><styleUrl>root: > > 00b0: 2f 2f 73 74 79 6c 65 4d 61 70 73 23 64 65 66 61 //styleMaps#defa > > 00c0: 75 6c 74 2b 6e 69 63 6f 6e 3d 30 78 33 30 34 2b ult+nicon=0x304+ > > 00d0: 68 69 63 6f 6e 3d 30 78 33 31 34 3c 2f 73 74 79 hicon=0x314</sty > > 00e0: 6c 65 55 72 6c 3e 3c 50 6f 69 6e 74 3e 3c 63 6f leUrl><Point><co > > 00f0: 6f 72 64 69 6e 61 74 65 73 3e 31 32 2e 35 33 37 ordinates>12.537 > > 0100: 38 39 35 2c 35 35 2e 38 31 36 33 32 38 2c 30 3c 895,55.816328,0< > > 0110: 2f 63 6f 6f 72 64 69 6e 61 74 65 73 3e 3c 2f 50 /coordinates></P > > 0120: 6f 69 6e 74 3e 3c 4c 6f 6f 6b 41 74 3e 3c 6c 6f oint><LookAt><lo > > 0130: 6e 67 69 74 75 64 65 3e 31 32 2e 35 33 37 38 39 ngitude>12.53789 > > 0140: 35 3c 2f 6c 6f 6e 67 69 74 75 64 65 3e 3c 6c 61 5</longitude><la > > 0150: 74 69 74 75 64 65 3e 35 35 2e 38 31 36 33 32 38 titude>55.816328 > > 0160: 3c 2f 6c 61 74 69 74 75 64 65 3e 3c 72 61 6e 67 </latitude><rang > > 0170: 65 3e 31 35 36 37 2e 30 34 37 32 34 31 3c 2f 72 e>1567.047241</r > > 0180: 61 6e 67 65 3e 3c 2f 4c 6f 6f 6b 41 74 3e 3c 2f ange></LookAt></ > > 0190: 50 6c 61 63 65 6d 61 72 6b 3e 3c 2f 6b 6d 6c 3e Placemark></kml> > > 01a0: 0d 0a 30 0d 0a 0d 0a ..0.... > > > > I'm wondering about the latin small letter lambda before the XML, > > shouldn't that be incorrect? > > Because it parses fine and it surprised me actually. > > > > Cheers, > > Bryan Rasmussen > > > > _______________________________________________________________________ > > > > XML-DEV is a publicly archived, unmoderated list hosted by OASIS > > to support XML implementation and development. To minimize > > spam in the archives, you must subscribe before posting. > > > > [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/ > > Or unsubscribe: xml-dev-unsubscribe@l... > > subscribe: xml-dev-subscribe@l... > > List archive: http://lists.xml.org/archives/xml-dev/ > > List Guidelines: http://www.oasis-open.org/maillists/guidelines.php > > > > > -- > John Snelson, Oracle Corporation http://snelson.org.uk/john > Berkeley DB XML: http://www.oracle.com/database/berkeley-db/xml > XQilla: http://xqilla.sourceforge.net >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|