Add some "BOLD" text to the paragraph XML element

I try to get the following result:

< book > < p > now < "BOLD" > Hello Brown < / bold > cow < /p > < / book >

That's what I have:

var tagRoot = new XML ("< book >");

p. tagRoot [0] [0] = "Hello now."

.bold .p [0] tagRoot [0] = "brown";

tagRoot [0] [0] of .p += "cow";

Alert (tagRoot)

For some reason, it transforms the supports of the "BOLD" tag in HTML entities.

How can I get the above output?

Thank you

Kurtis

var tagRoot = new XML("");
tagRoot[0].p[0] = "hello now";
tagRoot[0].p[0].bold = "brown";
tagRoot[0].p[0].appendChild (" cow");
alert(tagRoot.toXMLString())

tagRoot [0] [0] of .p += 'cow' will first convert the content of the

tag chain, then add the word "cow", then assign the new content channel to the

tag.

Tags: InDesign

Similar Questions

  • How to add and edit text in the form created by adobe acrobat 9?

    How to add and edit text in the form created by adobe acrobat 9?

    Actually, that's exactly what you should do, you don't need to create

    all fields again.

    After you have edited the original and create a new static PDF, open the old

    version and use the command replace Pages to insert the new pages

    those in the old file. This will keep all the form fields in tact.

    Tuesday, August 25, 2015 at 10:28, susanna323 [email protected]>

  • The pdf I want to change has all embedded fonts.  When I try to insert a comma, I get the message, "all or part of the selection has no available system fonts.» Cannot add or remove text using the selected font. "Will I still have this problem

    The pdf I want to change has all embedded fonts.  When I try to insert a comma, I get the message, "all or part of the selection has no available system fonts.» Cannot add or remove text using the selected font. "Will I still have this problem if I'm updating from Acrobat X?

    You have the fonts installed in the system. This has not changed. (Having the police is not always enough, but it is certainly necessary).

  • get the text of the paragraph?

    Hi all

    How to extract text perticular single paragraph object.  I've searched the forums and get the paragraph.texts.itemByRange () methods, but I don't know how to use this method to get the text of perticular and I want to delete the text of the paragraph.

    I would appreciate for any help to...

    Kind regards

    Imagine

    Sorry, that makes it clearer.

    1 itemByRange is useful only when you have the beginning and the end of the range in the form of numbers. What, where you plan to do? Ask in a dialog box from where to where to remove them? The lines "the user has selected" text are just a choice, and you can manipulate that immediately. There is no reason to convert it to a format usable for itemByRange first.

    2. at this stage in your stage of learning, should not focus on Getting the * thing at work, rather than focusing on writing elegant, easy to manage, short but not darkened code? All of you who have no meaning if your script does not run.

  • (AS) Select the text of the paragraph without bringing out the carriage return

    (AS) Select the text of the paragraph without bringing out the carriage return character.

    I need help to select a paragraph in a story.
    The selection does not contain a 'return' (ASCII number 13 ")

    My current sample is as follows:
    -example assumes that the insertion point is already placed in a specific paragraph.

    Tell application "Adobe InDesign CS3"
    activate
    theDoc Set to the active document
    say theDoc
    Select the paragraph 1 of the selection
    end tell--theDoc
    end tell--app

    Sounds simple... The example above to select my paragraph selected.

    but he also chose the carriage return also. How would I go to do this?

    Any advice would be helpful!

    Thank you!

    Try:

    Select text in character-2 of paragraph 1 of the selection of character 1

  • Import of text in the file XML, '\n' works not

    Hi I am looking to set up my game so it pulls in all the text in an external XML file (to switch between different languages easier). The problem is that several times, I need to use the special code "\n" to start a new line (for purposes of formatting) but when I'm pulling the text in from the XML file is not starts a new line-it appears just as usual in the text. (for example "this is some text example \n") How to do this?

    Here, any help appreciated, I'm supposed to finish everything by tomorrow so I need suggestions asap thank you haha.

    XML.ignoreWhitespace = false;

  • FF4 showing all the Arial Bold text since the upgrade (including screenshot)

    Screenshot: http://i.imgur.com/4Ef0t.jpg

    The comparison is between FF4 on top and Chrome below. See the text of the article to see the difference in the fonts to display. This happens almost every Web sites that allows the browser to choose the font (Google, Bing, etc.).

    I tried to watch the display of content options and set them by default. Also exhaustively, I googled this problem without results that were helpful.

    This problem started as soon I upgraded to FF4. This problem does not occur in FF3

    Wow, that by chance that I just had this problem too (I installed Age of Empires yesterday).

    to fix it, I went to this web site and downloaded the Arial font (not the Mizo Arial at the top, it is about five fonts down) and placed on the Arial in my Windows/Fonts folder:

    http://www.fonts101.com/search/Arial.aspx

    good luck and thanks for the help!

  • How to add symbols to text on the EDGE

    I need to add symbols to text to an animation on BOARD, but do not know how to access.

    How to do?

    Is Steve is

    Thank you! Works like a charm!

    Is Steve is

  • Check for the existing XML element

    Hi all

    I'm writing a simple script first check if an XML element exists and creating so if it's not. I tried to change a piece of code that I used previously to do the same for paragraph styles, but apparently it's not that simple. Currently, all I get is the error "Unable to run the script in the 'main' target engine!" Without checking them, adding the XML element based on the result of the search works very well.

    /* Find all instances of the word "Superscript" */
    app.findTextPreferences.findWhat = "Superscript";
    var mySuperscript = myDocument.findText(); // Save search result for future reference
    
    /* See if an XML element named "Superscript" already exists, and create it if that's not the case; then add it to all instances of the word "Superscript" */
    var myXMLElementSuper = myDocument.xmlElements.item("Superscript");
    try {
    var myName = myXMLElementSuper.name;
    }
    catch (myError){
        var myXMLElementSuper = myDocument.xmlElements.add({markupTag:"Superscript", xmlContent:mySuperscript[i]});}
    

    Any help would be greatly appreciated!

    Regards and thanks in advance.

    Julian

    The myDocument.xmlElements always has a single element - the root element.

    If you want your element directly below that, you have to work a level down.

    To try-catch for such situations regular aid is bad because you spend so usually the ESTK option stop on exceptions and real problems don't miss. Use the isValid property.

    var rootXE = myDocument.xmlElements.item(0);
    var superXE = rootXE.xmlElements.itemByName("Superscript");
    if( !superXE.isValid )
      superXE = rootXE.xmlElements.add(...
    else
     superXE = superXE.getElements()[0]; // take first of potentially multiple elements
    
  • Review of the text of the paragraph is bold or italic [JS] CS3

    Hello

    I'm trying to write a script to check a document in section my paragraph and change the text leading 8 and size of points if it is not bold or italic. The problem that I'm trying retrun value I can used to search the text of paragraph is "BOLD" and or italic.

    Does anyone know how to do this?

    Here's what I have so far;

    var the_document = app.documents.item (0);
    var the_story = app.selection [0] .parentStory;

    counter = 0;

    {}
    var current_paragraph = the_story.paragraphs.item (counter)


    {with (the_document.textDefaults)}

    var mytextobject = current_paragraph.texts.firstItem ();
    mytextobject. Leading = 8;
    mytextobject.pointSize = 7;
    }

    counter ++;
    } While (counter < the_story.paragraphs.length);

    The font style is held in a text property called "fontStyle", a string of simple text holding something as "Ordinary", "Italic", "Bold" and "Bold Italic" (or, depending on your policy, something like 'Condensed Light', ' "Extended BOLD" #2 "or"76 Black Italic"").

    ATTENTION: you seem to be checking the entire paragraphs. If the fontstyle is mixed, the property will be indefinite. It will be "Bold" or "Italic" If the entire paragraph, including his final statement is bolded or italicized .

  • Cannot add some JPEG files to the library (randomly)?

    Hello

    I just started using Lightroom, and I began by importing all the old/previous/existing images (same old in JPEG format). However, some of them will not add to the library. Lightroom just tells me something went wrong when you add it, but I can see perfectly in Windows Picture Viewer and Photoshop.

    Can it be a problem with corrupted metadata? What can I do to fix these images?

    If anyone need to watch one of these photos of issues, I can email you one.

    Thanks in advance! / Jonas

    Clvrmnky,

    you really should tyr jpgsnoop as well. :}

    Looks like there are a few fields not identified additional exif...

    Thus, if the PS open is very good, so I would save them as a new file.  Most likely, there are some corrupt headers that PS is a ignorant, but saving of PS in a new file will recreate the headers, and you'll proabably be able to import them.  At least, it's worth a try.  And you could lots with PS, isn't a lot of hassle if necessary.

    See you soon!

  • Footer has the "BOLD" text on the home page, and not in other pages with the same CSS... <>?

    I can't find why the footer displays bold at Yolaine but not bold in the other 3 pages: more yolaine etc.

    style #Footer are the same (sesem.css), and returns html for all pages:

    < div id = "Footer" class 'fluid' = > Stichting Eigentijds Speelgoedmuseum, pressed en meer (Yolaine) < a href = "mailto: " [email protected] "> < br > .

    [email protected] < /a > & #124;  www.sesem.nl < br >

    NL11RABO0301748330 < br >

    & copy; 2015 Yolaine < / div >

    What Miss me?

    Thanks in advance,

    Martian

    On the homepage, it is bounded on other pages, that it is not in a strong tag.

    100 online you open a new tag strong but never shut it down:

    Interview Radio Oost met Jan Bugter, voorzitter Yolaine

    get rid of it and it wil work:

    Interview Radio Oost met Jan Bugter, voorzitter Yolaine

  • Big and bold text in the applet

    Hello everyone!

    Anyone know how to make a text in a "BOLD" particular applet control and increase its size?
    (he is a dynamic text and not static)

    Thank you very much!

    Hello

    Toggle applet will help this feature.

    Kind regards
    Joseph

  • Can I create a brochure (11 x 17), which includes some pictures/text with the elements?

    I'm considering the purchase of items. My main need is to create two or three brochures per year for the I volunteer not-for-profit. Is it possible - and, more important still, desirable - to tempt with elements? I am a mac user.

    I would recommend that you take a look at free Open Office utilities of Oracle that has publish, PDF, spreadsheets and word processing all inclusive. PSE9 would be ideal for image editing and for inclusion in these documents.

    You certainly want to avoid Quark Express or Adobe InDesign CS5.5, as you will certainly pay for the features you will ever need.

    http://www.openofficefreedownload.org/LP2.html

  • Problem in obtaining the root XML element. (without prefix)

    Hi all

    my xml is as below.

    < ns1:abcd >
    < ns2: a > 1 < / ns2: a >
    < ns2:b > 2 < / ns2:b >
    < / ns1:abcd >

    If I try to retrieve the value of the root of the xml document.

    Myroot node = doc.getDocumentElement ();

    String result = myroot.getNodeName ();

    My output is ns1:abcd... I want only 'abcd '...

    Also if I try to print myroot.getPrefix, myroot.getNamespaceURI... all these values are null.

    My xml will not always have the same namespaces... starting from the xml inbound I must first check for namespaces... Please give me an idea.

    I think so.. I need an evaluation space names to...

    Please help me in this regard.

    Thank you
    Sabarisri. N

    Hi Sabarisri,

    Please try the following code:

    import java.io.StringReader;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.xml.sax.InputSource;
    
    public class Runner2 {
        public static void main(String[] args) {
            String xmlString =
                "" +
                "  1" +
                "  2" +
                "";
    
            try {
                InputSource is = new InputSource(new StringReader(xmlString));
                DocumentBuilder docBuilder =
                    DocumentBuilderFactory.newInstance().newDocumentBuilder();
                Document document = docBuilder.parse(is);
                Element element = document.getDocumentElement();
                System.out.println(element.getLocalName());
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
    

    Kind regards
    Pino

Maybe you are looking for