I was experimenting with various development tools to present end-user database information, via a Java Web App and really struggled to get consistent results. Some queries would return data correctly, while others simply failed miserably. Usually in situations like this, you need to make sure that database access is correct, field specifications and SQL correctly formatted - you know the deal.
However, best as I might try, I simply could not get some queries to work. Admittedly my environment is quite complex, with various databases and servers, including a GlassFish App Server and a few web servers involved. In the end, the answer was very simple, and I really should have picked this up earlier. The app needs to generate the 'answer' of the query as XML output. Eventually it dawned on me - special XML characters!! Some of the database queries returned field values that contained 'special' XML characters, such as < or > or &. These are used in XML (obviously) to start and end tags (as an example). To solve the problem, you need to 'clean' every returned value from the database, before rendering the XML output. Some of the special characters are :
& replace with &
< replace with <
> replace with >
" replace with "
' replace with '
Once this was done, the XML was properly formatted and could then be used by apps further down the chain.
Here I am showing how we can use pattern attributes to display objects using different colours. We are using an attribute called ROOM_USE to...
We have not had a lot of time to update information about genes1s CAD, but I want to start adding some videos on some of the features availa...
Welcome to the CAD Essence Blog (AGAIN)! We will keep you updated with our latest developments on genes1s CAD and related products. The rece...
Had a real problem yesterday, when testing the use of UK Postcodes and trying to geocode the location using Google Maps API . Turns out tha...