PDA

View Full Version : <string/>


Nikolai
Apr-14-2005, 09:56 PM
Man, it got me..

In case of empty album title response looks like
<VALUE><STRING /></VALUE>

<value><string/></value>
not like

<value><string></string></value>
I understand that it's a valid XML code, but I was not prepared for that and my parser was choking on it.. Took me a while to figure out what's wrong..

New version (build 120) takes care of this situation..

devbobo
Apr-14-2005, 10:18 PM
huh ?

Man, it got me..

In case of empty album title response looks like
<value><string></string>


not like


I understand that it's a valid XML code, but I was not prepared for that and my parser was choking on it.. Took me a while to figure out what's wrong..

New version (build 120) takes care of this situation..</value></value>

Nikolai
Apr-15-2005, 05:17 AM
huh ?

</VALUE></VALUE>:-)

One of my long-term customers contacted me recently and informed me that S*E has trouble shoiwng some of his albums. After very extensive troubleshooting I found out that the real reason was he had few albums without names. In which case getAlbums method would return simply < string/ > <STRING />instead of < string > < /string ><STRING></STRING>, and my parser would choke on it and bail out, ignoring the rest of the response data (which contained those "missing" albums info)..

onethumb
Apr-15-2005, 07:15 AM
:-)

One of my long-term customers contacted me recently and informed me that S*E has trouble shoiwng some of his albums. After very extensive troubleshooting I found out that the real reason was he had few albums without names. In which case getAlbums method would return simply < string/ > <STRING />instead of < string > < /string ><STRING></STRING>, and my parser would choke on it and bail out, ignoring the rest of the response data (which contained those "missing" albums info)..

Wait, albums without names? That shouldn't be allowed. Which albums were they?

Don

Nikolai
Apr-15-2005, 07:46 AM
Wait, albums without names? That shouldn't be allowed. Which albums were they?

Don
They were some old albums (not mine:-), probably from the times when SM UI was allowing these things.
I cannot give you exact IDs now (my debugging logs are at home, and I'm at work already). I would assume you can look for empty/null entries in your database. If not - let me know if you need those IDs, I'll email them to support@smugmug.com tonight.

Cheers!:1drink

Broke Guy
Apr-29-2005, 08:20 AM
at least they caught a bug in S*E :)

Nikolai
Apr-29-2005, 09:39 AM
at least they caught a bug in S*E :)They are still lurking there sometimes, those nasty little bastards;-)