Alert Content for text without any XML tag

Hi All,
For the XML workflow,
Need a alert content or select content for the text without any xml tag.
Please help for my XML job request.
Regards
Siraj

Hi All,
New to XML, just learning stage only.
Already I asked and got the coding through forum. It alert text frame ID only.
But, guide me how to get the
1. alert or select the contents.
2. alert the page number or select text frame etc.
Coding is below:
#target InDesign
#include "/Applications/Adobe InDesign CS6/Scripts/Xml Rules/glue code.jsx"
main();
exit();
function main() {
          var myDoc = app.activeDocument;
          var myStories = myDoc.stories.everyItem().getElements();
          var idArray = new Array(0);
          var storyArray = new Array(0);
          // store all stories of the document in an array
          for(var j=0; j < myStories.length; j++) {
                    storyArray.push(myStories[j].id);
// *** here start the XML-Rules ******************************//
          var elements = myDoc.xmlElements;
          var myRuleSet = new Array(
                    alleObj = new all(idArray)
          __processRuleSet(elements.item(0), myRuleSet);
// *** here stop the XML-Rules *******************************//
          for (var i=0; i < idArray.length; i++) {
                    for (var k=0; k < storyArray.length; k++) {
                              if (idArray[i] == storyArray[k]) {
                                        storyArray[k] = -1;
          for (var i=0; i < storyArray.length; i++) {
                    if (storyArray[i] > 0) {
                              alert(storyArray[i]);
                    }          // if …
          }          // for()
}          // main()
// XML-Rule
function all(idArray) {
          this.name = "all";
          this.xpath = "//*";
          this.apply = function(myElement, myRuleProcessor) {
            var storyId = myElement.parentStory.id;
                    var i=0, found = false;
                    while ((i < idArray.length) && (!found)) {
                              if (idArray[i++] == storyId) found=true;
                    // store anly the number of the stories which are not stored up to now
                    if (!found) idArray.push(storyId);
            return true;
          }          // this.apply
}          // all()
Regards
Siraj

Similar Messages

  • How to create a flat file without any xml tags in PI 7.0

    Hi
    I would like to take the content of the tiff-tag and map it to a file, which content is the value of the tiff-tag. How do I do that?
    source:
    <sourcexml>
       <tiff>dhlflfhlfhjhfjhfakjhfkjhfkjhfahflkhflahfalhfalhfldhflkahflak</tiff>
    </sourcexml>
    resulting content of file:
    "dhlflfhlfhjhfjhfakjhfkjhfkjhfahflkhflahfalhfalhfldhflkahflak"
    The point is, the the resulting file should not contain any xml tags but only the plain value of the tiff tag in the source document.
    Do I need to specify something in the receiver file adapter?
    tiff is an image format.
    BR
    Mikael

    Hi
    after the mapping and thus as input to the File receiver  CC the message looks like this:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:blob xmlns:ns0="http://dongenergy.dk/pi/zztest/milun">
      <indhold>tiffog dadada</indhold>
      </ns0:blob>
    Recordset Structure is set to "indhold,1"
    and the "lines" are
    indhold.addHeaderLine  = 0
    indhold.fieldSeparator = 'nl'
    A file is created but it is empty.
    Mikael

  • I've had this website as my homepage in Firefox for years without any problem ...

    == Issue
    ==
    Firefox is having problems with certain web sites
    == Description
    ==
    I've had this website as my homepage in Firefox for years without any problem (http://www.ncbi.nlm.nih.gov/pubmed). Recently (as of 1 week or so) I get redirected to https://proxy.ucla.edu/auth?uri=http%3A%2F%2Fwww.ncbi.nlm.nih.gov%2Fentrez%2Fquery.fcgi%3Fdb%3DPubMed when I try to load this in firefox. I don't have a problem with safari. What is going on here. I happens with all the NCBI websites in firefox but not with other browsers. Haven't checked other bookmarks rigorously, but this seems to be the only problem.
    == URL of affected sites
    ==
    http://www.ncbi.nlm.nih.gov
    == Troubleshooting information
    ==
    Application Basics
    Name
    Firefox
    Version
    3.6.6
    Profile Directory
    Show in Finder
    Installed Plugins
    about:plugins
    Build Configuration
    about:buildconfig
    Extensions
    Name
    Version
    Enabled
    ID
    Modified Preferences
    Name
    Value
    accessibility.typeaheadfind.flashBar
    0
    browser.history_expire_days.mirror
    180
    browser.places.importBookmarksHTML
    false
    browser.places.importDefaults
    false
    browser.places.leftPaneFolderId
    -1
    browser.places.migratePostDataAnnotations
    false
    browser.places.smartBookmarksVersion
    2
    browser.places.updateRecentTagsUri
    false
    browser.startup.homepage
    http://www.ncbi.nih.gov/entrez/query.fcgi?db=PubMed
    browser.startup.homepage_override.mstone
    rv:1.9.2.6
    browser.tabs.warnOnClose
    false
    dom.disable_open_during_load
    false
    extensions.lastAppVersion
    3.6.6
    network.cookie.prefsMigrated
    true
    places.last_vacuum
    1277074995
    print.macosx.pagesetup
    PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHBsaXN0IFBVQkxJQyAiLS8vQXBwbGUgQ29tcHV0ZXIvL0RURCBQTElT…
    print.macosx.pagesetup-2
    PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHBsaXN0IFBVQkxJQyAiLS8vQXBwbGUvL0RURCBQTElTVCAxLjAvL0VO…
    print.print_bgcolor
    false
    print.print_bgimages
    false
    print.print_command
    print.print_downloadfonts
    false
    print.print_evenpages
    true
    print.print_in_color
    true
    print.print_margin_bottom
    0.5
    print.print_margin_left
    0.5
    print.print_margin_right
    0.5
    print.print_margin_top
    0.5
    print.print_oddpages
    true
    print.print_orientation
    0
    print.print_pagedelay
    500
    print.print_paper_data
    0
    print.print_paper_height
    11.00
    print.print_paper_size
    0
    print.print_paper_size_type
    1
    print.print_paper_size_unit
    0
    print.print_paper_width
    8.50
    print.print_printer
    print.print_reversed
    false
    print.print_scaling
    1.00
    print.print_shrink_to_fit
    true
    print.print_to_file
    false
    print.print_unwriteable_margin_bottom
    17
    print.print_unwriteable_margin_left
    17
    print.print_unwriteable_margin_right
    17
    print.print_unwriteable_margin_top
    17
    privacy.sanitize.migrateFx3Prefs
    true
    privacy.sanitize.timeSpan
    0
    security.warn_viewing_mixed
    false
    == Firefox version
    ==
    3.6.6
    == Operating system
    ==
    PPC Mac OS X 10.5
    == User Agent
    ==
    Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6
    == Plugins installed
    ==
    *-Gecko default plugin
    *Runs Java applets using the latest installed versions of Java. For more information: Java Embedding Plugin. Run version test: Java Information.
    *Runs Java applets using the &LT;APPLET&GT;, &LT;OBJECT&GT; and &LT;EMBED&GT; HTML elements. For more information see MRJ Plugin and MRJ Plugin JEP.
    *The Flip4Mac WMV Plugin allows you to view Windows Media content using QuickTime.
    *iPhoto6
    *Office Live Update v1.0
    *Java Plug-In 2 for NPAPI Browsers
    *Shockwave Flash 10.1 r53
    *The QuickTime Plugin allows you to view a wide variety of multimedia content in web pages. For more information, visit the QuickTime Web site.

    I shall post a screenshot the next time it happens, I shall also printscreen the URL too.

  • SPRunConversionVersion7.0.119:Doesn't Work for Account without any ratetype

    Hi Experts,
    I work with SAP BPC MS7.0
    And the SPRUNCONVERSION doesn't work for accounts without any ratetype : value in the dimension is in blanck.
    I though that it was supposed to work like this :
    "The stored procedure SPRUNCONVERSION scans all records found in the selected region of data and translates them according to the RATETYPE property assigned to the ACCOUNT specified in each record, based on the following mechanism:
    All ACCOUNTS with no RATETYPE (ratetype = blank) will be translated with a factor of 1
    All ACCOUNTS with the reserved RATETYPE = NOTRANS will not be translated
    All other ACCOUNTS will be translated according to the definitions contained in the table of parameters called clcFXTRANS."
    Doesn someone has faced this problem already ? how can I solve it ?
    Thanks for your help,
    Olivia

    Hi Olivia,
    This was seen as inconsistent behavior and was corrected in SP10.
    See the following note [1569127|https://service.sap.com/sap/support/notes/1569127] for further information.
    Thanks,
    John

  • [CS3 JS] How to associate text with an XML tag

    Hello,
    I have a script that allows one to create or modify an XML tag after one selects text, a text frame or an existing XML tag. It works fine for making the XML tag but it does not associate the text or text frame to the tag. To do that I have to right click on the selection and use the context menu to Tag Text or Tag Frame.
    I want to make this automatic but cannot see how to script it.
    Thanks for any help

    I figured out the problem (which of course creates other interesting problems).
    In the line:
    var elementRef = rootElement.xmlElements.add (tagRef);
    I forgot to add a reference to the xmlContent. It should read:
    var elementRef = rootElement.xmlElements.add (tagRef, whatToTag);
    However, this script is designed to create a dialog box where one can either create a tag along with attributes or edit an existing one. I'll post it when I am done, but there is one hangup. The script not only changes the name of a selected xml tag but all tags with the same name. How can I get it to change only the selected tag? Below is the boiled down script that duplicates that problem.
    Thanks,
    Tom
    var myDoc = app.activeDocument;
    var selObj = app.selection[0];
    var TagIWantToChange = selObj.markupTag;
    var newTagName = "PleaseWork"; //This line replaces all the coding to create a dialog box where the tag name could be edited.
    TagIWantToChange.name = newTagName;

  • JMS adapter receiver - converion to text without any end-of-line character

    Hi everybody,
    We have the scenario
    RFC -> PI7.11 -> JMS (MQ Series)
    I want to convert the XML document of PI into a text format.
    In destination MQSeries, we can't have any end-of-line separator because the destination of MQS target is a Mainframe .
    How can we  suppress this character End-of-line ?
    Can anybody help me top solve this issue, please ?
    Thank you for you help in advance.
    Kind Regards
    E. Koralewski

    I solved my issue
    I used the module AF_Modules\StrictXml2PlainBean
    and I put the parameter field.endSeparator without any value.
    Kind Regards

  • Search for, edit, and delete XML tag (Adobe InDesign Server CS5)

    Hi all,
    I'm working with Indesign Server CS5 and JavaScript, though having some trouble coming up with a solution to a problem...
    I need to build a JS script (called through SOAP) that will enable me to search an InDesign file for a given XML tag.
    Upon finding the XML tag, if the 'action' variable is set to delete, it should delete the tag and its contents.
    If the action is set to edit, it should change the contents of the tag to some user-specified content.
    The primary caveat is that the XML tag is variable, as is the XML structure of the InDesign file.
    Here's what I have in mind, in pseudocode:
    function findXMLTag(tag, action) {
         app.searchForTag(tag);
         if (tagIsFound) {
              if (action == "delete") {
                   tag.delete;
              } else if (action == "edit") {
                   tag.contents = "Updated content";
    Any help would be greatly appreciated!
    Thanks,
    Ben Kay

    'searchForTag' can be implemented as a recursive function.
    Recursion is defined like this: I thought, "I'll just search this forum for 'recursion'." The first post I found was one of my own, suggesting that the poster should search the forum for 'recursion'.
    Here is an example: find the XML Element [<email>]
    And another: Remove xml element using JS[CS3] (read carefully, as the OP got stuck on how to successfully remove an element and continue)
    And one, using XML Rules -- which I'm totally unfamiliar with, but may work for you: Changing Values in XML tags

  • Dynamic config for attachment without any message mapping in mail adapter

    Hi,
    In our scenario, we are not using any message mapping as a specification.A fixed length file is sent from source via proxy as an attachment to the mail.
    here the issue is with the file name of the attachment. how do we configure the attachment file name dynamically with out using any message maping.
    Regards,
    Divya

    Hi Divya,
    I understand you want to set name for mail attachment.
    SAP Note: Mail Adapter sapnote_0000856599
    Q: Can I choose the name of an attachment in the mail?
    A: Yes. Most mail clients use some heuristics based on some *MIME headers to derive the name of an attachment.* The MIME headers involved in most heuristics are Content-Type, Content-Description,and Content-Disposition. When you create an XI message, the XI payload name is automatically set in the Content-Description. If you want to change or set all of these headers, you can use the MessageTransformBean module (Note 793922) [Link|http://help.sap.com/saphelp_nwpi711/helpdata/en/57/0b2c4142aef623e10000000a155106/frameset.htm]
    in the adapter framework.
    Q: How can I set the file name of a mail attachment?
    There are several MIME headers that play a role in how the client retrieves the file name of an attachment. Unfortunately, this behavior differs among various mail clients. The reason for this inconsistent behavior comes from the fact that this mechanism has been extended incrementally. The old way is to use the name parameter in the Content-Type header as specified in RFC1341. For example, you can set the content type of an XML attachment as:
    Content-Type: application/xml; name="abc.xml"
    RFC1521 discourages the use of this name parameter in anticipation of the new header Content-Disposition, which is defined in RFC1806.
    With this Content-Disposition header, you can set the file name as:
    Content-Disposition: attachment; filename="abc.xml"
    Some clients may show the Content-Description value as the file name. The Content-Description header is typically used to associate some descriptive information to an attachment (RFC1341) as in
    Content-Description: my xml file
    To avoid potential interpretation problems, it is recommended to combine the use of these headers.
    Regards,
    Raghu_Vamsee
    Edited by: Raghu Vamsee on Feb 3, 2011 12:23 PM

  • Sender File (FCC) - Content of File into single XML Tag

    Hi,
    Input file
    This is Line1
    This is Line2
    Expected Sender File adapter FCC into XML
    <Document>
    .<File>
    ..<Content> This is line 1 This is line2</content>
    .</File>
    </Document>
    FCC is giving the following output with the below config,
    File.fieldNames = Content
    File.fieldSeparator = '0x1A' (HexaDecimal rep for EndOfFile)
    <Document>
    .<File>
    ..<Content>This is line 1</content>
    ..<Content>This is line 2</content>
    .</File>
    </Document>
    How can i read the complete file into a single XML tag?
    I am aware of other options (AdapterModules or Javamapping). But i want to keep it simple to FileAdapter using FCC or using MessageTransformBean (if possible)
    -SM

    FCC donse't work here, So i wrote a simple Java map inside Execute method to convert the content to the required format.
      public void execute(InputStream in, OutputStream out)  throws StreamTransformationException{
    StringBuilder sb = new StringBuilder();
           try {
           BufferedReader reader = new BufferedReader(new InputStreamReader(in, "UTF-8"));
           while ((line = reader.readLine()) != null) {
               sb.append(line).append("\r\n");
           } finally {
           in.close();
    After i had the input string, i formatted it to get the required output as XML ...
    <Document>
    .<File>
    ..<Content> This is line 1 This is line2</content>
    .</File>
    </Document>

  • Idoc texting without any EDI or EAI

    Hello,
    I have a  text file to test in SAP with the following IDOC DEBMAS05.
    Does somebody the méthodology to run the test without any middleware...
    thanks
    Roger

    Use test tool (transaction WE19) for inbound IDOC test.

  • How to merge all parts of a variable without losing xml tags?

    Hi
    In my Bpel process I have I invoke an operation whose output variable is a multi-part variable. Due to some requirements , I need to merge the data from all the parts (without removing the XML tags) and return them in a single part Bpel output variable. So I'm using the below expression in the copy rule:
    concat(concat(concat(concat(concat('<body>',bpws:getVariableData('Function_OutputVariable','body')),'</body>'),
    '<header>'),bpws:getVariableData('Function_OutputVariable','header')),'</header>')
    But the resultant value (the culprit is getVariableData) is deprived of all xml tags in the output parts. For example if my operation output variable is of 2 parts as ::
    <Function_OutputVariable>
    <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="body">
    <Function_Response_body xmlns:oans="http://xmlns.oracle.com/apps/fnd/rep/ws" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Return>
    <InterfaceFunction>
    <FunctionId>1024976</FunctionId>
    </InterfaceFunction>
    </Return>
    </oans:Function_Response_body>
    </part>
    <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="header">
    <Function_Response_header xmlns:oans="http://xmlns.oracle.com/apps/fnd/rep/ws" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    Blah
    </oans:Function_Response_header>
    </part>
    </Function_OutputVariable>
    My resultant expression becomes
    <body> 1024976 SERVICEBEAN:/oracle/apps/fnd/rep/ws/IntegrationRepositoryService:getInterfaceFunction INTERFACE get InterfaceFunction Gets a InterfaceFunction based on its primary key attributes. NONE RESP getInterfaceFunction 1 PUBLIC ACTIVE R2V0cyBhIEludGVyZmFjZUZ1bmN0aW9uIGJhc2VkIG9uIGl0cyBwcmltYXJ5IGtleSBhdHRy aWJ1dGVz S S 509 </body>
    <header> blah </header>
    How to avoid this problem? Please advice.
    thanks,
    kannan

    iPhoto Library Manager  is the only application available that can merge libraries and keep albums as well as keywords, comments, places and other meta data.    Keepsakes like books and slideshows will come across as albums.
    The following is from the iPLM help file:
    What can and can't be copied
    Due to technical limitations with iPhoto, not every type of item in an iPhoto library can be copied to another library. The table below summarized what can and can't be copied in each version of iPhoto, with more details explanations of each item below. This applies to copying albums and events between libraries via drag and drop, merging libraries, and rebuilding a library.
    iPhoto 6 or earlier
    iPhoto 7
    iPhoto 8
    iPhoto 9
    Photos with basic metadata (rating, keywords, date, description, title)
    Unsupported
    Yes
    Yes
    Yes
    Modified versions of photos paired with originals
    Unsupported
    Yes
    Yes
    Yes
    Individual photo edits (e.g. cropping, filters, color adjustments, etc.)
    Unsupported
    No
    Yes
    Yes
    Places data
    Unsupported
    n/a
    Yes
    Yes
    Faces data
    Unsupported
    n/a
    Yes
    Yes
    Regular albums
    Unsupported
    Yes
    Yes
    Yes
    Folder albums
    Unsupported
    Yes
    Yes
    Yes
    Smart albums
    Unsupported
    Yes
    Yes
    Yes
    Events
    Unsupported
    Yes
    Yes
    Yes
    Keepsake items (books, slideshows, etc.)
    Unsupported
    No
    No
    No
    MobileMe galleries
    Unsupported
    iPhoto auto-syncs
    iPhoto auto-syncs
    iPhoto auto-syncs
    Facebook/Flickr galleries
    Unsupported
    n/a
    No
    iPhoto auto-syncs
    OT

  • Leopard asking for password without any reason ?

    Hi,
    Leopard asked me for user password without any reason. I wasn't installing any software.. just surfing the web.
    Furthermore my desktop wasn't working so I relaunched Finder.
    Is it kind of virus or is it normal ?
    thanks

    I've selected All Processes but there isn't installer... see the picture:
    http://dl.getdropbox.com/u/72686/noInstaller.png

  • How to get a text between two XML tags?

    Hello everybody!
    I've got a problem! How can I extract a text that is between tags, like <myTag> My text </myTag> I have no problem to get the attributes inside the tags, however, i don't know how to get some text that is between tags. Here is my xml:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <tangram_request service_id="3">
    <send keep_session="nada">
    <source></source>
    <destination>3196931566</destination>
    <channel_id>2</channel_id>
    <text>Teste ServerSocket!!!</text>
    </send>
    </tangram_request>
    Now, there's a fragment of my code, which gets some tags' attributes:
    DOMParser parser = new DOMParser();
    InputSource resp = new InputSource(new StringReader(XML));
    parser.parse(resp);
    Document doc = parser.getDocument();
    Node node =(doc.getElementsByTagName "tangram_request")).item(0);
    if (node instanceof Element)
    Element el = (Element) node;
    service_id = el.getAttribute("service_id");
    System.out.println("\n\nService_id="+service_id);
    }else{System.out.println("Erro");}
    node = (doc.getElementsByTagName("send")).item(0);
    if (node instanceof Element)
    Element el = (Element) node;
    keep_session = el.getAttribute("keep_session");
    System.out.println("keep_session="+keep_session);
    }else{System.out.println("Erro");}
    Now, I want to get the texte between <destination> ... </destination>
    How could I do that?
    Thanks a lot
    Calegari

    Thanks... It worked fine!!!
    Now how can I get lots of <desctination>... I did something that haven't worked...
    node = (doc.getElementsByTagName("destination")).item(0);
    while(node.hasChildNodes())
    destination = node.removeChild(node.getFirstChild()).getNodeValue();
    System.out.println("destination="+destination);
    And now, my XML is like:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <tangram_request service_id="3">
    <send keep_session="nada">
    <source></source>
    <destination>3196931566</destination>
    <destination>3196931567</destination>
    <channel_id>2</channel_id>
    <text>Teste ServerSocket!!!</text>
    </send>
    </tangram_request>
    Thanks so much!
    Calegari

  • Why i have got charged from itunes for 7500/- without any authorisation from my side?

    Why i have got charged from itunes for INR 7500/- without any authorisation from my side?
    Precise date and time of charges levied are 18th of May 2013 at 15:49:07.
    Kind request to reverse the same on an urgent basis and send me the acknowledgment and confirmation about the same.
    Regards,
    Abhishek Dave
    <edited by host> 

    It is probably a test charge to see that the account you have established is valid. Apple will not pursue the charge and it will eventually drop out of the system.   It is simply a technical matter.

  • Pretagging text with ID styles without using XML tags

    I just wanna pretag some text with ID styles, such that when I place the text, it joins the layout already formatted.
    But how? Can I do this without drinking from the XML cup?
    Thx.

    Many thanks for your reply.<br /><br />When I export tagged copy (either verbose or abbreviated methods), the resulting text document is complex -- all kinds of coding. Yet, when placed back into ID, it appears correctly formatted.<br /><br />But my attempts to pretag new text with, say, <ParaStyle:New subsubcat> (one of the exported tags), brings in the tag itself, not correctly formatted new text. What to do?<br /><br />I was unable to locate the PDF document about tagged text that you referenced. My upgrades are downloads, not discs.<br />Any further suggestions on where to find the PDF document.<br /><br />Thanks again.

Maybe you are looking for