Server-side xml validator anyone ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Server-side xml validator anyone ?

Graham Samuel via use-livecode
Hi list,
I have several server-side LC scripts that transform text and data
uploaded by end users on web pages into xml to be stored in a database and
used later in other web pages or apps.
The problem is, despite all the correction scripts I have added, that
sometimes the uploaded content corrupts the xml structure. This happens
for instance when some weird UTF-8 text is uploaded.
Is there a ready-to-use piece of code that would check the conformity of
some xml data that I could include in my LC scripts ?

Thanks in advance,
jbv


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Server-side xml validator anyone ?

Graham Samuel via use-livecode
If your XML is UTF8-enconded and your UTF8 data is correct, it will
work. Your probably isn't invalid XML but either a problem with the
encoding of the entire file or a particular string.

The best way to validate XML on your server is to install a little
command line utility and use the shell function.


Op 12-01-18 om 13:19 schreef jbv via use-livecode:

> Hi list,
> I have several server-side LC scripts that transform text and data
> uploaded by end users on web pages into xml to be stored in a database and
> used later in other web pages or apps.
> The problem is, despite all the correction scripts I have added, that
> sometimes the uploaded content corrupts the xml structure. This happens
> for instance when some weird UTF-8 text is uploaded.
> Is there a ready-to-use piece of code that would check the conformity of
> some xml data that I could include in my LC scripts ?
>
> Thanks in advance,
> jbv
>


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Server-side xml validator anyone ?

Graham Samuel via use-livecode
On Sat, January 13, 2018 2:08 pm, Mark via use-livecode wrote:
> If your XML is UTF8-enconded and your UTF8 data is correct, it will
> work. Your probably isn't invalid XML but either a problem with the
> encoding of the entire file or a particular string.
>
> The best way to validate XML on your server is to install a little
> command line utility and use the shell function.
>
>

Thanks for your reply.
Yes, that's exactly what I'm doing : I'm using a small php script
I found on the web; but as the xml can be quite large, I need to
use temporary files, and things get a bit slow at times.
That's why I was hoping for a 100% LC solution.

Best.


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode