The web service method pwg.images.exist returns the md5 sums of the images as markups. For instance, here is a result :
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<33ad8a38ac38d2213562c13a630b2a7a>106</33ad8a38ac38d2213562c13a630b2a7a>
</rsp>
The XML is malformed because the first markup character is a number (the XML specifications do not accept a number as the first character).
It can cause bugs when an XML parser is used. For instance, with a java XML parser, trying to read the above text gives :
[Fatal Error] :1:56: The content of elements must consist of well-formed character data or markup.
Changing the XML to something like that could be a possibility :
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<md5sum value="33ad8a38ac38d2213562c13a630b2a7a">106</md5sum>
</rsp>
**Reported by mlg on 1 May 2011 15:27**
The web service method pwg.images.exist returns the md5 sums of the images as markups. For instance, here is a result :
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<33ad8a38ac38d2213562c13a630b2a7a>106</33ad8a38ac38d2213562c13a630b2a7a>
</rsp>
The XML is malformed because the first markup character is a number (the XML specifications do not accept a number as the first character).
It can cause bugs when an XML parser is used. For instance, with a java XML parser, trying to read the above text gives :
[Fatal Error] :1:56: The content of elements must consist of well-formed character data or markup.
Changing the XML to something like that could be a possibility :
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<md5sum value="33ad8a38ac38d2213562c13a630b2a7a">106</md5sum>
</rsp>
[Piwigo Bugtracker #2290](http://piwigo.org/bugs/view.php?id=2290)
<!-- github-sync-id:97226261 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Reported by mlg on 1 May 2011 15:27
The web service method pwg.images.exist returns the md5 sums of the images as markups. For instance, here is a result :
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<33ad8a38ac38d2213562c13a630b2a7a>106</33ad8a38ac38d2213562c13a630b2a7a>
</rsp>
The XML is malformed because the first markup character is a number (the XML specifications do not accept a number as the first character).
It can cause bugs when an XML parser is used. For instance, with a java XML parser, trying to read the above text gives :
[Fatal Error] :1:56: The content of elements must consist of well-formed character data or markup.
Changing the XML to something like that could be a possibility :
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<md5sum value="33ad8a38ac38d2213562c13a630b2a7a">106</md5sum>
</rsp>
Piwigo Bugtracker #2290