Ah, document-get() ... perfect ... thanks !

- Danny

On Wed, Sep 2, 2015 at 4:44 PM, Joe Bryan <[email protected]> wrote:

> Hi Danny,
>
> You don't need to have the DLL stored in the database in order to use
> xdmp:document-filter(). You merely need to have it's contents as a node()
> (specifically, a document-node() or binary() node). That node could come in
> as the response to a network request (to another system), it could be
> received as parameter in a network request, it could be read from the
> filesystem, etc.
>
> Here's an example reading from the filesystem:
>
> let $doc := xdmp:document-get("/Users/jbryan/Downloads/sample.pdf")
> return xdmp:document-filter($doc)
>
> Thanks.
>
> -jb
>
> From: <[email protected]> on behalf of Danny Sinang
> <[email protected]>
> Reply-To: MarkLogic Developer Discussion <[email protected]>
> Date: Wednesday, September 2, 2015 at 4:37 PM
> To: MarkLogic Developer Discussion <[email protected]>
> Subject: Re: [MarkLogic Dev General] Running executable from XQuery
>
> Hi David,
>
> Thank you very much for pointing out that article.
>
> xdmp:document-filter() accepts a node parameter. Since the DLL is on the
> filesystem, does this mean I need to ingest the DLL into ML first before I
> can pass it to xdmp:document-filter() ?
>
> Regards,
> Danny
>
> On Wed, Sep 2, 2015 at 3:29 PM, David Ennis <[email protected]>
> wrote:
>
>> HI.
>>
>> [other than some hooks for custom search extensions], MarkLogic does not
>> have a way to directly run code external to itself. You always need to
>> bridge to this other code as you have seen in the MLJAM example.
>>
>> However.. Looking at your use case, consider the fact that MarkLogic can
>> extract interesting metadata from over 100 different file formats.. DLL
>> (Windoes Executable) is one of them (lister under 'other'
>>
>> https://docs.marklogic.com/guide/search-dev/binary-document-metadata
>>
>> So, maybe your goal is reachable by using ML to do the extraction for
>> you...
>>
>>
>>
>> Kind Regards,
>> David Ennis
>>
>>
>> David Ennis
>> *Content Engineer*
>>
>> [image: HintTech]  <http://www.hinttech.com/>
>> Mastering the value of content
>> creative | technology | content
>>
>> Delftechpark 37i
>> 2628 XJ Delft
>> The Netherlands
>> T: +31 88 268 25 00
>> M: +31 63 091 72 80
>>
>> [image: http://www.hinttech.com] <http://www.hinttech.com>
>> <https://twitter.com/HintTech>  <http://www.facebook.com/HintTech>
>> <http://www.linkedin.com/company/HintTech>
>>
>> On 2 September 2015 at 21:17, Danny Sinang <[email protected]> wrote:
>>
>>> Has anyone here tried running Windows executable files from within
>>> XQuery scripts ?
>>>
>>> I've got a VBScript that can read the version info of any given DLL, and
>>> I'd like to invoke it from an ML scheduled task and store the version info
>>> inside MarkLogic.
>>>
>>> The list of DLLs to read is stored in an XML file inside MarkLogic.
>>>
>>> I think I can probably use MLJAM to make the OS run the VBScript, but
>>> I'm wondering if there's a solution out there that involves less components
>>> / moving parts.
>>>
>>> Regards,
>>> Danny
>>>
>>> _______________________________________________
>>> General mailing list
>>> [email protected]
>>> Manage your subscription at:
>>> http://developer.marklogic.com/mailman/listinfo/general
>>>
>>>
>>
>> _______________________________________________
>> General mailing list
>> [email protected]
>> Manage your subscription at:
>> http://developer.marklogic.com/mailman/listinfo/general
>>
>>
>
> _______________________________________________
> General mailing list
> [email protected]
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
>
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to