[MarkLogic Dev General] Determining a documents content-length
Mark Helmstetter
Mark.Helmstetter at marklogic.com
Mon Oct 22 09:50:44 PDT 2007
You could do:
fn:string-length(xdmp:quote(fn:doc("/foo/bar.xml")))
If it's something you may want to do often and/or programmatically query
against all documents in the repository based on size, then you may want
to consider structuring your documents such that the size is stored
somewhere in the document, e.g. a metadata section, or you could store
that data in document-properties.
________________________________
From: general-bounces at marklogic.com
[mailto:general-bounces at marklogic.com] On Behalf Of Gary Vidal
Sent: Monday, October 22, 2007 11:57 AM
To: general at marklogic.com
Subject: [MarkLogic Dev General] Determining a documents content-length
I was wondering if there is a way to determine how large a document is.
I need to be able to query for large files or include the filesize as a
standard property.
Is there any way this can be achieved?
Gary Vidal
Sr. .Net Developer
Tel: 212-592-4946
gvidal at alm.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20071022/05e12bf4/attachment.html
More information about the General
mailing list