let $img := <img 
src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"/>
return binary {
  xs:hexBinary(
    xs:base64Binary(
      substring-after(
        $img/@src,
        ';base64,'))) }

-- Mike

On 3 May 2013, at 13:43 , "Tim" <[email protected]> wrote:

> Hi Folks,
> 
> I have images embedded in an xhtml file that I want to extract from the
> XHTML, store in a spate file in MarkLogic, and then change the XHTML to
> reference the image where it has been stored.  The biggest hurdle is
> extracting the image.  For example, the image is currently located in the
> xhtml as follows:
> 
> <span style="height:4.3256in;width:5.2201in; padding:0; " class="fr1"
> id="Picture_1"><img style="height:10.987cm;width:13.2591cm;" alt=""
> src="data:image/*;base64,iVBORw0KGgoA... "/></span>
> 
> Thanks!
> 
> Tim Meagher
> 
> 
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
> 

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to