[JS/CS6] How can I reach or remove text remains which is stuck in the XML Structure
Sometimes, the remnants of the deleted text are found at a parent level or root of the XML structure. How can I 'find' scripts?
Above, a sample image. The root should be just '<>' and there may be hundreds of items marked under the root, which should not be deleted. The only thing that needs to be removed is the text that shows inside the element root, because it is not in use anywhere.
To fix it as I want, I can manually drag the document root, enter the editor mode (Ctrl + Y) and delete the text. I do in the editor mode to avoid the deletion of all the other child nodes of the root, which happens easily if I delete all the text in the textframe. When I delete the textframe, after you remove the top-level text which has been 'stuck' before, everything is nice.
I'd like one to write a script that deletes the text which has got stuck in the root of the way which is shown in the picture (the root is not in the page, it should be empty in case I'm on).
Defining the content of the xmlElement to "translates in all of the sub-elements being deleted (not what I want).
Thank you
Andreas
It of not elegant, but should work. I can't think of a way to distinguish the 0xFEFFs that "contain" children of other 0xFEFFs that you may have in the history of the root, so that would leave all the ones you hang out.
var root = app.activeDocument.xmlElements[0], i, character; if (root.parentStory.constructor.name === 'XmlStory') { for (i = root.xmlContent.characters.length - 1; i >= 0; i--) { character = root.xmlContent.characters[i]; if (character.contents.charCodeAt(0) !== 65279) { character.remove(); } } }
Jeff
Tags: InDesign
Similar Questions
-
How can I permanently disable obsolete warnings because I'm stuck with the old machine, I
I'm stuck with OS 10.4 and can't update Firefox or plug-ins all further. Get - again and again! -caveat by Firefox. How can I disable those permanently?
-
On my ipad, addresses in the e-mail of sellers are appearing in my favorite app of cards. I can't remove them as I can with other recent in the cards. How can I stop this from happening? I'm not typed the e-mail address link.
Maps - tap the box down a drop of addresses
Under recent - click Favorites
At the bottom, click on Favorites and remove addresses from this point of view - shot from right to left
-
I bought my computer from someone else. Change user accounts did not take their name off of each (or more) file in the computer. How can I change or remove the user/name/document
I have looked everywhere and changed user information and the name of the administrator. What can I do else?Hello flashgordonjxn,
Who has ever done the installation of Windows, the installation program asks you to enter your name and optionally, the name of the organization. These registration information appears under recommended for in the general tab of the System when you click Start, click Control Panel, click performance and Maintenanceand then click System.
To change see instructions below:
- Click Startand then click run.
- In the Open box, type regedit, and then click OK.
- Look for the following registry key:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
- To change the name of the company, follow these steps:
In the right pane, double-click RegisteredOrganization. Under value data, type the name that you want, and then click OK.
- To change the name of the registered owner, follow these steps:
In the right pane, double-click RegisteredOwner. Under value data, type the name that you want, and then click OK.
- Click Exit on the file menu to exit the registry editor.
Hope this helps you. Let us know anyway. Make it a great day!
"And in the end the love you take, is equal to The Love You Make" (The Beatles last song from their latest album, Abbey Road.)
-
Orifginal title: Aggrevation
How can you stop safely remove hardware to appear when there is nothing connected to the USB ports? It is causing my screen lock and give an error does not.
Hi ElginCarelock,
You can try to restart the computer and check.
Uninstall all USB device manager entries
a. Click Start and typedevmgmt.msc and press ENTER.
b. expand Bus USB controllers.
Note: You will need to scroll down to find this point.
c. the first USB controller under Bus USB controllers right click and then click on uninstall to remove it.
d. Repeat steps above for each controller USB is listed under Bus USB controllers.
e. restart the computer and check.
Hope this information is useful.
-
I have two user accounts, now I forgot the password of an account with administrative privileges, how can I reset or remove this password
I have two user accounts, now I forgot the password of an account with administrative privileges, how can I reset or remove this password
There are a lot of options built into Windows to help you out of this situation:- Restart the computer with your Windows repair CD, then use system restore to set Windows in a few days (only works if you have recently changed the password).
- Log in as administrator mode without failure, then reset the password for your existing account (the password is usually empty).
- Insert your flash drive USB with the password key file (only works if you have taken the time to create such a key file).
- Use the password indicator (works only if you have created a hint and if it's good enough to allow you to guess the password)
- Check your paper files (works only if you threw down the password somewhere)
After solving this problem, plan in advance and create, test and document an alternative admin account, same as you have a spare House key. -
Dreamweaver CS6 how can I automatically indent the code? I've already put the presets and the codeview options, but it does not work. Thanks for advice
Commands > apply Source format.
I use it so often, I created a shortcut to it.
Nancy O.
-
I am a senior student and I have used both CS3 and trials of photoshop CS6, how can I extend this test without paying money?
I'm sorry to look like someone trying to cheat the system. I honestly don't want to I was wondering if there are things up so I can get a trial extended as a student, as I have with all my CAD software for graphics. If there is no way to do that, I'll be happy to pay for the programs I need.
-
I had trail cc version, now I want to install cs6, how can it be done?
I had trail cc version, now I want to install cs6, how can I do, I have a license number
I have no dvd driver
You might be able to download the app CS6 CS6 link on the page linked below...
-
I'm trying to install Acrobat 8 Std on a laptop computer that was in need of a restoration. He asks the file AdobePDF.dll since my Vista CD - I do not have. How can I get this file or another which will allow my Acrobat 8 work on this laptop with Win 8.1, which she did before restoring?
John,
AdobePDF.dll is in the file Data1.cab. Mine is located in C:\Program Files (x 86) \Adobe\Acrobat8\Adobe Acrobat 8 Professional\ You need to extract the file "AdobePDF.dll_64" from the .cab file. You can do this with WinZip or 7-Zip. Everything you need to extract is this file, nothing else... Once you have extracted it, remove the _64, so the name of the file is AdobePDF.dll. Then place the file in any location you want and run the program it when asked. For a file location, I suggest to C:\Program Files (x 86) \Adobe\Acrobat8\
Hope that helps.
-
I can't reach some websites with any browser. I get the message ERR_CONNECTION_REFUSED. If I boot in safe mode I don't have the issue. I tried the reset and repair of everything. Help, please
Try to run this program in your usual account, then copy and paste the result in a response. The program was created by Etresoft, a regular contributor. Use please copy and paste the screenshots can be difficult to read. On the screen with the Options, please open Options and tick the boxes in the bottom 2 before the race. Click on the button "Report share" in the toolbar, select "Copy to Clipboard" and then paste into a response. This will show what is running on your computer. No personal information is shown.
-
How can I say ios10 music playing ONLY what is loaded on the phone?
How can I say ios10 music playing ONLY what is loaded on the phone? There was a way under ios9, but I can't find anything on ios10. When I shuffle a kind (like ROCK that has only 4 artists, I chose it), I want to shuffle only what is loaded on the phone, not what's on my mac (in the cloud)... I load only a few artists both because of space constraints. I have over 200GB of music on my mac...
I don't want to see the playlists and artists who are not loaded on the phone either, but I can't find how to solve either!
Launch the music application and go to the library > music downloaded. This shows that what is stored locally on the phone.
-
How can I make Apple sent an official request for Andorra in the list of international codes?
Apple acknowledges that Andorra Telecom (Mobiland) is an approved operator.
However it does not include the international dialing code of Andorra (+ 376) in the list of phone prefixes in the country.
This prevents verification services, such as in two steps and two-factor authentication.
How can I make Apple sent an official request for Andorra in the list of international codes?
Thank you.
-
When I send a text message and mobile data are off, it is not given, but I do not see this message for a few minutes. I can then refer using "send as a text message. How can I 'send as a text message' in the first place?
Disable the iMessage?
-
How can I restore iTunes a large number of items currently in the Recycle Bin?
How can I restore iTunes a large number of items currently in the Recycle Bin?
See if the menu in iTunes to undo option is available. If it is not, go to the Recycle Bin and drag the files into the folder automatically add to iTunes. iTunes 9: understanding the "Automatically add to iTunes" folder - http://support.apple.com/kb/HT3832 - files placed in this folder are actually moved from this folder to the correct location in the iTunes Media folder.
Maybe you are looking for
-
Qosmio x 770: cannot read to revolution - how to switch to nVidia GPU
HI :) I come from Germany and my English is very bad, sorry. I need help, because I want to play Worms: revolution on my Qosmio x 770 with a Nvidia GeForce GTX 560 M and it does not work. This is the post coming from "support @ team17. Hey,. Sorry to
-
How to retrieve selected item via onSelectedValueChanged picker?
Hi all I would like to display the selected word Picker but how to retrieve the value selected picker using onSelectedValueChanged?How and where to report this var dataModel.data (row) = selectedItem; on the pickers?Pickers use row or rootIndexPath?
-
Z10 blackBerry how to display the email address where the mail I received was sent?
Someone help please? I'm so frustrated not to see the email address where email. If that's a touch I can pull up, but I want to see anyone / anytime with a touch of the screen, or a default view adjustment. All I get is a name, and I couldn't find a
-
Microsoft Spades is broken?
Have not been able to open Microsoft Spades (Wiindows7) for several days. No error message, just will not open.
-
What type of earpiece that must I use?
I want to run a background process that listens when a user clicks in a field of text on a Web page. Is this possible? What type of earpiece that must I use?