List:General Discussion« Previous MessageNext Message »
From:Chris Blackwell Date:August 13 2004 9:00am
Subject:RE: Escaped BLOB data in XML
View as plain text  
If you base64 encode your binary, it will be valid inside the xml.  As far
as I know this is the accepted way to transfer binary objects using xml.

chris 

-----Original Message-----
From: Karam Chand [mailto:karam_chand03@stripped] 
Sent: 13 August 2004 05:09
To: Keith Ivey; mysql@stripped
Subject: Re: Escaped BLOB data in XML

This leads me to another question. What are the valid ASCII characters that
XML parser understands. 

Are they only a-1,A-Z,0-9,., etc or some other characters.

Regards,
Karam
--- Karam Chand <karam_chand03@stripped> wrote:

> Hello,
> 
> Hmmm. I was figuring that out. mysql_escape_string() only escapes 
> characters like \r, \n, \\, 0 etc. it still keep other non-character 
> data same like it keep ascii 15 to ascii 15 that no parser is able to 
> handle.
> 
> Isnt there any better way then base64 to handle this.
> Just like replacin < to &lt; solves the problem in the data?
> 
> Regards,
> Karam
> 
> --- Keith Ivey <keith@stripped> wrote:
> 
> > Karam Chand wrote:
> > 
> > >i have a table with a LONGBLOB column. We store
> > some
> > >small images in it. I want to export them in XML format with schema 
> > >like:
> > >
> > ><c>data</c>
> > ><c>data</c>
> > >...
> > >...
> > >
> > >Now the problem is even if I mysql_real_escape()
> > and
> > >changing entities like <,> to &lt; & &gt; the
> data
> > >some of the characters are of ascii value 12,13
> > etc.
> > >None of the XML parsers are able to recognise it
> > and
> > >they throw up error? I googled but couldnt find a refernce on how 
> > >to handle such characters in XML.
> > >  
> > >
> > 
> > This doesn't have anything to do with MySQL.  XML isn't really 
> > designed for directly containing binary data, so people
> generally
> > use Base64 encoding (or
> > occasionally some other method of encoding binary data in ASCII).  
> > The XML parser isn't going to be able to return the raw binary data 
> > -- you'll have to decode it.
> > 
> > --
> > Keith Ivey <keith@stripped>
> > Washington, DC
> > 
> > 
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:   
> >
>
http://lists.mysql.com/mysql?unsub=1
> > 
> > 
> 
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - Helps protect you from nasty viruses.
> http://promotions.yahoo.com/new_mail
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:   
>
http://lists.mysql.com/mysql?unsub=1
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/mysql?unsub=1




Thread
Escaped BLOB data in XMLKaram Chand12 Aug
  • Re: Escaped BLOB data in XMLKeith Ivey12 Aug
    • Re: Escaped BLOB data in XMLKaram Chand13 Aug
      • Re: Escaped BLOB data in XMLKaram Chand13 Aug
        • RE: Escaped BLOB data in XMLChris Blackwell13 Aug
  • Re: Escaped BLOB data in XMLPaul DuBois13 Aug