General XMetaL Discussion
XMetaL Community Forum › General XMetaL Discussion › How to count the characters in a printable document?
biswajitsr June 18, 2010 at 7:50 am
How to count the characters in a printable document?June 18, 2010 at 7:50 amParticipants 0Replies 1Last Activity 12 years, 9 months ago
How to count the characters in a printable document?Derek Read June 18, 2010 at 6:46 pm
Reply to: How to count the characters in a printable document?June 18, 2010 at 6:46 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.“
- You must be logged in to reply to this topic.