Jump to content

Parsing Uppercase but not Lowercase


StupidRalph

Recommended Posts

Why won't this parse? The posted XML will parse with no problem. However, if I was to change the <LINK> to <link> it won't parse. Its not a big deal but I'd still like to no why it won't parse.

<?xml version="1.0" encoding="iso-8859-1"?><website><page id="0"><name>Home</name><LINK>http://www.mydomain.com</LINK><title>CLW Technology</title><contentheader>• Our Company</contentheader><content><span style="width: 460px; padding-left: 20px; ">Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie <p>blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p></span></content></page><page id="1"><name>Control Panel</name><LINK>http://www.mydomain.com/admin/index.php</LINK><title>CLW Technology</title><contentheader>• Control Panel</contentheader><content><span style="width: 460px; padding-left: 20px; ">RANDOM TEXT 2<br />Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie <p>blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p></span></content></page></website>

Link to comment
Share on other sites

XML is case sensetive. If you access lowercase letters, you would write lowercase letters and if you write uppercase letters, you would access uppercase letters. If you use both cases, you need two codes to excract each cases of data.

Link to comment
Share on other sites

Yes I am very much aware that XML is case sensitive. However, before I had the link tag as uppercase. I had all 4 in lowercase. But when i went to parse my code it gave me the error as if I used UPPERCASE for a begginning tag when I really did not. I did a find and replace in Dreamweaver and changed all of my uppercase <LINK> to <link> and I got an error trying to parse. I then did another find and replace changing my <link> back to <LINK> and it parse correctly. Tell me if you can parse this page.

<?xml version="1.0" encoding="iso-8859-1"?><website><page index="0"><name>Home</name><link>http://www.mydomain.com</link><title>CLW Technology</title><contentheader>• Totally Framed</contentheader><content><span style="width: 460px; padding-left: 20px; ">Something about art goes here.<p>blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p></span></content></page><page index="1"><name>Control Panel</name><link>http://www.mydomain.com/admin/index.php</link><title>CLW Technology</title><contentheader>• Control Panel</contentheader><content><span style="width: 460px; padding-left: 20px; ">RANDOM TEXT 2<br />Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui <p>blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p></span></content></page></website>

As you can see I have all my <link> tags the same and in lowercase. But it still gives me a parse error like the first <link> is really <LINK> when it is not. This is the EXACT error that comes up from parsing the above XML. You can plainly see that all the <link> tags are the same. Can you figure it out?

End tag 'link' does not match the start tag 'LINK'. Error processing resource 'http://localhost/CLW/xml/TMPedc7sve49u.xml'....<LINK>http://www.mydomain.com</link>-------------------------------^
Link to comment
Share on other sites

I think it may possibly be a bug with Dreamweaver MX. I purposely made my first begginig <link> tag lowercase and my closing <LINK> tag UPPERCASE and it parse correctly. So I opened my browser and tried to view the same page and got an error. Okay so now I am really confused. I then make all of my <link> tags lowercase save it clear my temporary internet files and try to view it and ERROR. I go to the actual page via my browser and not Dreamweaver and I do not get an error. So the only thing I can figure out is that when Dreamweaver creates the temporary file to show in the browser it converts my tag to UPPERCASE. ORWhich REALLY wouldn't suprise me either would be a bug in Explorer 6. Weird but true.I am running windows xp sp2,macromedia mx, apache 2.0.54, php 4.4.0, Internet Explorer 6.0.2900.2180.xpsp_sp2_gdr.050301-1519I think I'll d/l mozilla and report back.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...