Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: decoding base64 data on client/browser?

From: Brandon@-----------.---------.---
To: NULL
Date: 3/3/2006 10:39:00 AM
Joe,

Progress, but not quite there.  Using the advice below, I can now alert() 
that nitem.nodeType = "bin.base64" (before nitem.nodeType = undefined).

However, when I alert() or try to save nitem.nodeTypedValue, it is 
zero-length -- nothing there.  The only way I have been able to get to the 
data at all is with nitem.childNodes.item(0).nodeTypedValue and that only 
gives me the encoded data, not the decoded data.

Any thoughts with this new evidence?  Is there anything else I can post that 
you think would help?

Thanks again!

Brandon

"Joe Fawcett" wrote:

> "Brandon" <Brandon@d...> wrote in message 
> news:D14BB88D-FB0C-420A-8B0E-46FF7F13B722@m......
> > Joe,
> >
> > First, THANK YOU for replying.  Yes, my xml includes the 
> > dt:dt="bin.base64".
> >
> > Here is one of my XML response files:
> > <?xml version="1.0"?>
> > <get_documents_response xmlns:dt="urn:schemas-microsoft-com:datatypes">
> > <document>
> >  <id>239</id>
> >  <success>1</success>
> >  <filename>file1infolder1.txt</filename>
> >  <filedata
> > dt:dt="bin.base64">aSdtIGEgZmlsZQ0KDQppJ20gYW4gZWRpdGVkIGZpbGUu</filedata>
> > </document>
> > </get_documents_response>
> >
> > Is it not possible to do this decoding on the client side maybe (I REALLY
> > hope that isn't the problem)?  Your routines, Joe... I saw them (or ones 
> > very
> > similar) when I was researching this problem, and they were one of my 
> > guides
> > for getting at least to where I am.
> >
> > Thanks again, Joe and all.
> >
> > Brandon
> >
> >
> And more to the point, having looked carefully at your code this time :)
> When you are on the filedata element you need its nodeTypedValue, not that 
> of its first child.
> 
> objStream.Write( nitem.nodeTypedValue );
> 
> 
> -- 
> 
> Joe Fawcett -  XML MVP
> 
> https://mvp.support.microsoft.com/profile=8AA9D5F5-E1C2-44C7-BCE8-8741D22D17A5
> 
> 
> 


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent