Pages: 1
Print
Author Topic: How to count the characters in a printable document?  (Read 1096 times)
biswajitsr
Member

Posts: 44


« on: June 18, 2010, 01:50:57 AM »

How to count the characters in a printable document?
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 1552



WWW
« Reply #1 on: June 18, 2010, 12:46:29 PM »

Please define the following in detail so we can try to give a good answer: "printable" and "characters".

"printable": What does this mean? I'm not sure what it means to be "non-printable", so that might be what is throwing me off here (ie: to me everything is "printable").

"characters": Which characters do you wish to count? All the characters in the XML source? Characters in a specific selection or portion of the document? Do we exclude all XML markup? Do we exclude tags (markup)? Do we exclude most markup but include attribute values? Do we include multiple repeated white-spaces, or should they be "normalized"? Do we include only "significant" white-spaces?

You may not need to answer every question above if you can describe your need by equating it to something else. For example: "I like the way product X does it and I need to do the same thing. You can download product X from productx.com/trialversion. After installing product X, open a file and select the function 'character count'."

Or better yet, a description of the intended usage for the count: "I wish to store my XML document within a field in my database that only allows 1024 characters. So, before I write it there I want to know if it will fit. Then if it is too big I can break it up into smaller chunks and make several writes to the DB."
« Last Edit: June 22, 2010, 03:35:25 PM by Derek Read » Logged
Pages: 1
Print
Jump to: