• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
XML tags as characters in InDesign 5.5
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XML tags as characters in InDesign 5.5


  • Subject: XML tags as characters in InDesign 5.5
  • From: Chris Paveglio <email@hidden>
  • Date: Fri, 12 Apr 2013 17:20:39 +0000
  • Thread-topic: XML tags as characters in InDesign 5.5

I¹ve found they are particularly problematic. I¹ve had them infect my output
until I found a way to get rid of them. Their unicode signature is 0xFEFF,
even for opening and closing tags it seems.

In Applescript I did this:

set unicodeTagChar to «data utxtFEFFFEFF»
set unicodeTagChar to unicodeTagChar as Unicode text

Then I had a function to replace characters I used later:
set finalXMLString to replaceText(finalXMLString, unicodeTagChar, "")

In my blended ASOC/Cocoa app I use a Cocoa method since I like using Cocoa
more whenever I can:

+(NSString *)stripText:(NSString *)theText
{
    //specifically for removing the unicodeTagChar from some text
    UniChar chars[] = {0xFEFF};
    NSString *string = [NSString stringWithCharacters:chars length:1];
    return [theText stringByReplacingOccurrencesOfString:string
withString:@""];
}


HTH,
Chris



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


  • Prev by Date: Re: duplicate command
  • Next by Date: Re: duplicate command
  • Previous by thread: Re: duplicate command
  • Next by thread: File Location by Reference
  • Index(es):
    • Date
    • Thread