content alert text without any XML tag
Hi all
For the XML workflow.
Need of a content alert or select the content of the text without any xml tag.
Please help for my XML application.
Concerning
Siraj
Try this,
var myDoc = app.activeDocument; var myPages = myDoc.pages; for(i=0; iVandy
Tags: InDesign
Similar Questions
How can I replace a range / the text in an XML tag
I want to replace a piece of text in an XML tag in a text frame.
In my input parameters, I have the In-design page number, UID text frame in this page and the name of the XML tag within this block of text
that surrounds my old text.
which interface/function/command can I use who can help me to replace the existing text with the input text?
for example:
[old text] --> [new text]
where [] is the XML tag with the name tag1.
After a few trails and POC, I was able to write the piece of code below.
It detects the start and end position of the marker and based on that we can replace the text inside. It will be useful.
InterfacePtr
data (signalMgr, UseDefaultIID());
If (data == nil)
{
break;
}
UIDRef docRef = data-> GetDocument();
InterfacePtr
doc (docRef, IID_IDOCUMENT);
IDataBase * db = docRef.GetDataBase ();
Get the spread
InterfacePtr
spreadList (doc, UseDefaultIID());
Int32 spreadCount is spreadList-> GetSpreadCount();.
for (int32 spreadIndex = 0; spreadIndex)< spreadcount;="" spreadindex++="">
{
Get the reference to the spread
UIDRef spreadUIDRef (db, spreadList-> GetNthSpreadUID (spreadIndex));
Get the object of dissemination
InterfacePtr
spread (spreadUIDRef, UseDefaultIID());
Int32 numberOfPages = spread-> GetNumPages();
for (int32 nPage = 0; nPage)< numberofpages;="" npage++="">
{
UIDList pageItemList (db);
spread-> GetItemsOnPage (nPage, & pageItemList, kFalse, kFalse);
Browse page items and save on the UID of executives.
Int32 pageItemListLength = pageItemList.Length ();
for (int32 j = 0; j)< pageitemlistlength;="" j++="">
{
UIDRef pageItemRef = pageItemList.GetRef (j);
InterfacePtr
frame (pageItemRef, UseDefaultIID());
If (frame-> IsTextFrame())
{
Now try to get the position of the Guide to the XML tag
TextIndex 0 = startPos, endPos = 0;
IXMLReferenceData * xmlReferenceData = Utils
()-> QueryXMLReferenceData (pageItemRef);
REF XMLReference = xmlReferenceData-> GetReference();
IIDXMLElement * element = REF. Instantiate();
InterfacePtr
(REF.). Instantiate());
TagUID UID = element-> GetTagUID();
WideString elementName = element-> GetTagString();
for (int32 i = 0; i < element-=""> GetChildCount(); i ++)
{
ChildRef = element XMLReference-> GetNthChild (i);
InterfacePtr
child_element (childRef.Instantiate ());
tagUID = child_element-> GetTagUID();
elementName = child_element-> GetTagString();
Int32 index = 0;
Utils
()-> GetElementMarkerPositions (child_element, & startPos and endPos);
startPos += 1; to proceed exclude the starting tag
}
}
}
} / / Browse pages spread
}
Cloning of text without any relationship... How?
Hello
Flash CS5
For example, I would like to create a clone of a text box, I named the text in properties, I select and go copy paste in place and it is also bearing the same property name, so no coding affecting that will affect this one also. If I rename this perhaps properties I'll be ok and ind that it is now considered independently of the original item.
It seems that copy paste creates a bound element, delete or change one and other changes too.
What is the best way to use something that you created and make a clone to then change this option without the source being also influenced by the changes?
Envirographics
If you copy and paste a textfield and he wears the same instance name, one of them will work with the code. You need to name them differently to get the text that has been using code.
For objects such as clips, or other symbols of the library, if you copy and paste on the stage, they are always the symbol of the library, so canging we change all instances. If you want to create different instances, you need to copy in the library, not on the stage and you need to be sure they do not contain other library symbols that could be changed as well.
What is the easiest way to read a value of XML tag
Hi all
Im not at all experienced in the use of the XML parser library.
How can I retrieve the value of the label?
I use the matching node get all (see attachment). Get XML gives me:ABDELKADER
How can I retrieve the value of the tag (AAAA), without the XML tags directly?
Thank you all
You can use the get node text Content.vi of the same range as the other function XML you use.
From a node property uses the "node value".
Create text online the content of a xml tag frame?
Hello! I have a pretty big document created from an XML file, and I would like to convert a series of my XML tags to the anchor text blocks, so I can hang them on the left edge of the lines they appear in.
My XML file is converted into a
> root
> Chapter
> para
> id
1
> verse
text
> id
> verse
etc... See extract file here http://1drv.ms/1dX6lYO
So far, I have the following, which gets me an array containing all the elements ID.
var myDocument = app.activeDocument; var myXMLidElement = myDocument.xmlElements.itemByName("book").xmlElements.itemByName("c").xmlElements.itemByName("p").xmlElements.itemByName("id"); var myXMLidText= (myXMLidElement.contents); var myXMLidLength = myXMLidText.length; for (var i = 0; i < myXMLidLength; i++) { //loop to go through //alert (myXMLidText[i]); myDocument.select(myXMLidText[0]); //this gives me an error saying expected data type needs to be array. Can someone explain? Where do I find info on the select command? myDocument.selection[0].insertionPoints[0].textFrames.add(myXMLidText[0]); //haven't managed to get to this line yet, but I want it to create an inline text frame at the point of the selected text and set the frame's contents to be my XML Id TextI guess I want and then delete all the text in my id too, but that's not important.
Some other random excerpts, I could use?
myInlineFrame.contents = "myXMLidText";Guidance on the creation of the inline frames and the logic of loop? I'm an old hand with InDesign, but new to scripting, so be gentle.
Try this,
var myDocument = app.activeDocument; var root = myDocument.xmlElements[0]; var myXMLidElement = root.evaluateXPathExpression("//book/c/p/id"); for (var i = 0; i < myXMLidElement.length; i++) { myDocument.select(myXMLidElement[i]); var myTextframe = myXMLidElement[i].placeIntoInlineFrame(["1p","1p"]); }My addons page does not appear any content or text
Hello
My addons page does not appear any content or text.Snapshot is in the link given below.
http://I57.Tinypic.com/2vwek3n.PNGStart Firefox in Safe Mode {web link}
While you are in safe mode;
Press Alt or F10 to bring up the toolbar.
Followed;Windows; Tools > Options
Linux; Edit > Preferences
Mac; name of the application > PreferencesThen Advanced > General.
Find and stop using hardware acceleration.Search web sites secure. Are there problems?
Then restart.
I need to transfer my history of the text and images from my old iPhone to my new iPhone, but have already moved all other data to my new phone via iTunes and spent time to organize. How do I reset this transfer without any? I transfer a 5s to itself.
For your photos, try importing them to your computer and their synchronization then back to the SE.
Import photos and videos from your iPhone, iPad or iPod touch - Apple Support
For your texts, they moved with the backup restore?
Hi, Hello: I am trying to create a Web site and don't know what to do to display the content of my web browser to display full-screen itself without any empty space.
If you are looking to exhaust the entire screen with content regardless of the size of the browser called sensitive sites and unfortunately that are not supported in Muse. However, you can have some content such as backgrounds, slideshows and videos be full width.
Add the xml tag to specific words in a block of text
Hi all
I'm sure that it is not too complicated, but after hours of experimentation, research and reading, I can't look at it from the right angle. I'm trying to find a way to search for a specific word ('Figure' in my case) in a given text frame and add a corresponding XML tag automatically. I found a lot of information on how to apply it to a page item as a whole, but there no approach seems to work. Because I am fairly new to InDesign scripting, a little nudge in the right direction would be a huge help.
Regards and thanks in advance.
Julian
Hi Julian,.
Is - it ask you?
var doc = app.activeDocument; app.findTextPreferences.findWhat = "figure"; var found = doc.findText(); for(var i =0;iKind regards
Cognet
delete the text that is inside xml tags
Hello
I want to delete the text that is in the xml tags
IE SELECT ' < XXX > Pune < / XXX > < HD ZZZ > < / ZZZ > ' FROM DUAL must return PuneMH
Thank you
VIvek
Published by: Vivek P on October 7, 2008 08:35SQL> SQL> -- SQL> with t as ( 2 select '
Pune MH ' as x from dual) 3 -- 4 select x, 5 regexp_replace(x,'<.*?>') as modx 6 from t; X MODX ---------------------------- ----------Pune MH PuneMH SQL> SQL>isotope
Hi all! Working in InD CS6 in Windows 7.
I have a XML element in a document that I can't do anything with and who does not appear to be associated with what in the file of the InD. The red line is pointing to it on the Panel Structure in the image below. Note the X through its icon.
The XML is added to the InD file by mapping tags to styles using the Load... button on the dialog box map tags to Styles and 'import' of another document of the InD.
When right clicking this item in the Structure of Panel and selecting go to point the current selection goes, but then nothing else happens. Or to delete this in the Panel of Structures . I had a similar problem, a bit a go where I somehow finished with elements in the XML file that were not associated with what anyone in the document. Had those text display in the Structure Panel after the name as shown above, but, even once, go at them will not anywhere. I hadn't studied at the time because I could simply remove it from the structure.
With this element, however, I can't get rid of it without marking not any frame.
So, I guess I really questions. It's this thing! How the hell he get there? And is there a better way to remove it rather than not tagging any of the frame and have to re - mark all content.
EDIT: Just found out that using the trash on the pallet Structure to remove the parent of the problematic element, indeed, removes as problematic. Before him, I was just not marking the parent who has transferred only the problem child (like these word games) for the previous parent.
Thanks for reading this way-too-long-post.
All the best,
Ken
OK (he said with a blush to cheeks) I get noticed something in common, I didn't before posting.
Page to which cchimi kindly provided a link described icon as a part empty, and it is attached to an empty block. However, it is not only an empty block.
What happened in our file, is that the script containing the tag with an anchor marker tag xml that InD apparently do not like much. Type of logic, really.
Now, I may be cracking, but with a single instance of the element of 'bad' I thought THAT I could see the empty element in the story discovers with the anchor to a few characters on. I selected the anchor and dragged back between the start and end code and icon of the item has changed and he returned 'alive', I was able to handle it. For most other troublesome elements, however, sinpy AND marking a marker of the anchor, the XML tag does NOT display in story mode. The element gets the empty icon when you simply tag the anchor marker, in this case it is an anchor for a rule.
Hope this might help someone, someday.
Thanks again for reading.
Assign paragraph styles to xml tags correctly. How?
Hello
I want to assign xml tags to paragraph styles in InDesign CS6 on a Mac 10.6.8. The XML itself is organized as follows:
<? XML version = "1.0" encoding = "UTF-8" standalone = "yes"? >
< catalog >
< article id '32434' = >
"< img href="/bilder/32434.tiff "/ >
< artikeltextgruppe >
< artikelmarke > DieselGabana < / artikelmarke >
< artikelheadline > super Jeans ist < / artikelheadline >
< artikeltext > Superjeans knallt kidney. < / artikeltext > < number > 70238 < / weight >
< artikelmaterial > 100% Jeans < / artikelmaterial >
< artikelgroesse > UK < / artikelgroesse >
< artikelfarbe > UK < / artikelfarbe >
< / artikeltextgruppe >
< / product >
< / katalog >
By selecting the option "Assign formats by name to the tags' (translated from the German), I wanted to create the desired look. But if I start all I get is the entire < artikeltextgruppe > textblock assigned to 1 formatstyle. And not to mention that the whole content of < artikeltextgruppe > resembles a single paragraph without any structure (no line breaks) the content is properly structured, because I can highlight the value of e.g. < artikelmarke > separately by doubleclicking the tag in the structure view.
(a) what can I do to assign formats correctly AND to have correct line breaks?
"(b) if I drag my node < img href="/bilder/32434.tiff "/ > iin the layout, I get a message posted to search again for the location of the correct reference. And this happens independently on the use of the relative or absolute references (even if I need to use those on) what can I do here?
Thank you very much
First of all, I have probably do a search and replace to remove the group element with a text editor (
and elements). They aren't really necessary.Secondly, I usually create my styles with the same names as the items themselves. Then, after the XML is imported, I use the command "map tags to styles" in the Structure pane.
I copied and pasted the single article element to create 4 folders, added a change to an image for each record of the item. Once the paragraph styles have been mapped, your XML looked like this in form of two columns (to get all 4 records on a page)...
By default, ID creates a single line to a single line in the XML file. So if you want to be on their own line of the elements, the XML must be formatted like this. If you need a different style within a paragraph, you create character styles and edit the items in a group of XML and or paragraph and add the code in the XML file accordingly or post-processing once inside the code.
I still need to take the XML I gives me and reformat, moves with the tree items, change the links to the images, delete tabs and or spaces where I do not want, tag character styles, etc., to be closer to how I want the original format to be.
Mike
regular expression for the xml tags
Dear smart people of the labview world.
I have a question about how to match the names of xml text elements.
The image that I have some xml, for example:
Peter
13 and I want to match all of the names of elements, that is to say: no, son, grandson, age, regardless of any attribute have these items. There is a regular expression, I can loop, that can do this? (Something like "\<.+\> ". "") It is no good because it matches the entire xml string.) I'd really only two different expressions, one for the match start elements, e.g.
and one for the correspondence of the elements, for example.
Thanks for your help in advance!
Paul.
The site Of regular Expressions will be very convenient.
They have some good tutorials on regexp with a demo of the XML tags:
Here is a small excerpt:
The regular expression <\i\c*\s*>matches an opening of the XML without the attributes tag\i\c*\s*> corresponds to a closing tag. <\i\c*(\s+\i\c*\s*=\s*("[^"]*"|'[^']*'))*\s*>corresponds to an opening with a number any attributes. Put all together, <(\i\c*(\s+\i\c*\s*=\s*("[^"]*"|'[^']*'))*| i\c*)\s*="">corresponds to an opening with attributes or a closing tag. (source)
(\i\c*(\s+\i\c*\s*=\s*("[^"]*"|'[^']*'))*|>\i\c*(\s+\i\c*\s*=\s*("[^"]*"|'[^']*'))*\s*>
If you want advanced XML analysis I suggest JKI XML toolkit.
Tone
Need help to find and replace grep using Xml tags!
Hello world
I have a Textframe with value ($ 00.00) between two xml tags. a tag for "$" and another for a value (00 h 00).
Now I find these value (00 h 00) and change value (24.10). If I run the script, removing the price tag XML and updated price.
My expectation is the value of these update without deleting the XML tag.
Please suggest me where I made the mistake in the code. Please find the code and screenshot for your reference.
Before running the Script: After running the Script:
Code:
var flgGREP="[$]\\d+[.]\\d+" var Price="$24.10" myLine=app.selection[0]; FindReplaceValue(flgGREP,Price,myLine); function FindReplaceValue(findValue,replaceValue,Sapps){ app.findGrepPreferences = app.changeGrepPreferences = null; app.findGrepPreferences.findWhat = findValue; app.changeGrepPreferences.changeTo = replaceValue; Sapps.changeGrep(); }-yajiv
This is because the XML (opening and closing of the representations) tag is a special character but a generic.
So the above grep model fails because you have a text like [TAG] $[TAG] [TAG] 00.00 [TAG] is not picked up by the grep engine.
However there is not (unless I'm wrong) a metacharacter which could identify the brands of tags. You can do this in text F/R, but of course it is not as smooth as grep.
Bad news is that these special characters are not saved if you F/R on a labeled content (I mean in the above case).
Good luck for you is that you seem to know the markupTag that host the price = copy_frame so I'd domething like:
var root = app.activeDocument.xmlElements[0]; var copy_frame_tags = root.evaluateXPathExpression (".//copy_frame" ); var tag; while ( tag = copy_frame_tags.pop() ) { tag.contents=="00.00" && tag.contents="24.10"; }HTH
Loïc
Hi all! Working in InD CS6 in Windows 7.
I have a XML element in a document that I can't do anything with and who does not appear to be associated with what in the file of the InD. The red line is pointing to it on the Panel Structure in the image below. Note the X through its icon.
The XML is added to the InD file by mapping tags to styles using the Load... button on the dialog box map tags to Styles and 'import' of another document of the InD.
When right clicking this item in the Structure of Panel and selecting go to point the current selection goes, but then nothing else happens. Or to delete this in the Panel of Structures . I had a similar problem, a bit a go where I somehow finished with elements in the XML file that were not associated with what anyone in the document. Had those text display in the Structure Panel after the name as shown above, but, even once, go at them will not anywhere. I hadn't studied at the time because I could simply remove it from the structure.
With this element, however, I can't get rid of it without marking not any frame. I have a script routine that updates the XML attributes based on the style (s) applied to them. This element, but causes a script script error trying to access to the. Text (1), because there is not, I guess. The script goes through all the XML elements in order to open the Structure and use. Select the item to select an error occurs. But that's ALL!
So, I guess I really questions. It's this thing! How the hell he get there? And can I do in scripts for "see" it as one element is wandering?
Thanks for reading this way-too-long-post.
All the best,
Ken
OK (he said with a blush to cheeks) I get noticed something in common, I didn't before posting.
Page to which cchimi kindly provided a link described icon as a part empty, and it is attached to an empty block. However, it is not only an empty block.
What happened in our file, is that the script containing the tag with an anchor marker tag xml that InD apparently do not like much. Type of logic, really.
Now, I may be cracking, but with a single instance of the element of 'bad' I thought THAT I could see the empty element in the story discovers with the anchor to a few characters on. I selected the anchor and dragged back between the start and end code and icon of the item has changed and he returned 'alive', I was able to handle it. For most other troublesome elements, however, sinpy AND marking a marker of the anchor, the XML tag does NOT display in story mode. The element gets the empty icon when you simply tag the anchor marker, in this case it is an anchor for a rule.
Hope this might help someone, someday.
Thanks again for reading.
Maybe you are looking for
-
BT symbol is red after the software update of the BT
My laptop updated some bluetooth drivers yesterday and the little icon in the system tray that was blue is now red, it keeps telling me that bluetooth is not lit, anyone offer help any with this please.
-
Unable to complete step 2 (icon drag in the applications folder) when upgrading Firefox
I'm going through Firefox 3.6.11 to 3.6.12. Step 2 of the process says "drag the Firefox icon in your applications icon. First problem: I do not have an icon of applications. Second problem, being creative I open Finder on my Mac and try to drag the
-
Please help me to read the report of kernel panic
I get random kernel panics and don't know why. I've run the hardware diagnostic test and she returned to normal. Please help identify the problem Panic report *. panic (cpu 0 0xffffff8000c16df2 appellant): Kernel trap at 0xffffff8012629bc0, type 14 =
-
last 10 automatic updates has not installed on my system; windows xp x 86 service
last 10 automatic updates has not installed on my system; windows xp x 86 service
-
uninstall file lenovo tvt_gina.dll
Restore disk & recovery Lenovo laptop laptop T60 installs the file: tvt_gina.dll This file allows Windows XP open format traditional and said tvt_gina.dll must be uninstalled. How to get uninstalled tvt_gina.dll?