How to find the page number of an xml element

Hi everyone, sorry for my very bad English (french guy! logic). I hope you see what I'm looking for.

I'm script (javascript), of each articles export a script from a script multiple indesign pages.

In fact, I might have one or more article in a single file, each of which is a separate xml element. for each, I export an xml file named with, first, page where appears the xml element, the second number, the number of exported article.

I am the second goal of success, but not the first.

Someone has an idea?

Hi kazegonzo,

Please try the js code below, I have access to the doc/article/the title tag because the doc not placed in pages, you placed the title tags to access the title tag and get the page number.

var myDoc=app.activeDocument;
var root = myDoc.xmlElements[0];
var docTag = root.evaluateXPathExpression('//doc//article//titre');
for(i=0; i

THX,

csm_phil

Post edited by: csm_phil

Tags: InDesign

Similar Questions

  • How to find the Page number of the url of the APEX

    I have an application in which page #0 LOV are displayed for some pages. I can handle the show/hide the #0 LOVs page when the user navigates in the application using application variables. But when the user comes at the request of bookmarks, I would like to extract the page and number of fire a weather application process to display the LOvs #0 page or not. any ideas are appreciated.

    With the help of the: APP_PAGE_ID would be enough to know weather to show or hide from the LOV. I don't understand why you need (and how you use) an application LOV process appears on page 0.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • How to find the serial number of the processor in the MacBook pro s serial number? I have a dead MacBook that was given for service to a third party. I doubt that they have replaced the original parts. Help, please. Thank you

    How to find the serial number of the processor in the MacBook pro s serial number? I have a dead MacBook that was given for service to a third party. I doubt that they have replaced the original parts. Help, please. Thank you

    As far as I KNOW, the serial number of the MacBook does not have the serial number of the processor.

  • How to find the serial number adobe Installation section

    How to find the serial number adobe Installation section

    Creative cloud does not use a serial number and creative cloud subscribers for not having any serial number associated with their programs.  Creative cloud subscribers use their adobe ID to activate their programs.

    Download and install the desktop creative cloud application (after signing with your adobe - the same as that used to pay for your creative cloud subscription ID), https://creative.adobe.com/products/creative-cloud

    Open the office application (a shortcut will be on your desktop) > click applications, and then select the programs you want to install.

    the desktop application gives you access to the cs6, cc, cc 2014 and cc 2015 apps.  and probably more in the future.

    If you already have the cc desktop application and you need to update your adobe id, log out and then back to your client application using the adobe id to pay for your subscription in cc: http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html

  • How to find the page contains the indesign sdk?

    PLS, someone help me, how to find the page contains the indesign sdk?

    Thank you

    screen410099

    Don't know, if you find a shorter way, but it works:

    UIDRef language = YOUR_TABLE;

    Error result code.

    do

    {

    InterfacePtr textModel;

    TextIndex beginning;

    Len Int32;

    result = table_get_text_model (read, 0, 0, textModel, start, len);

    If (result! = kSuccess) break;

    If (! textModel) break;

    UIDRef frameRef = text_query_frame (textModel, start);

    If (! frameRef) break;

    Int32 pnum = - 1;

    PageRef UIDRef = page_getref (frameRef, &pnum);)

    If (! pageRef) break;

    :

    :

    } While (false);

    //***************************************************************************

    Error code (Table_get_text_model)

    Language UIDRef,

    Int32 left,

    top of Int32,

    InterfacePtr & textModel,

    TextIndex & start,

    Int32 & len)

    {

    Result ErrorCode = kFailure;

    do

    {

    Inits

    textModel = InterfacePtr (Nile);

    Start = 0;

    Len = text::kTextLen;

    Make sure that we have a valid table model

    InterfacePtr tableModel (label, UseDefaultIID());

    if(!tableModel) break;

    convert the network to a network ID address

    GridAddress gridAddress (top, left);

    get the container text table so we could make the text template.

    InterfacePtr tableTextContainer (tableModel, UseDefaultIID());

    if(!tableTextContainer) break;

    textModel = InterfacePtr (tableTextContainer-> QueryTextModel());

    if(!textModel) break;

    InterfacePtr tableTextContent (tableModel, UseDefaultIID());

    if(!tableTextContent) break;

    GA GridArea (up, left, top + 1, left + 1);

    Len = tableTextContent-> GetTextChunk (ga, start);

    If (! len) break;

    result = kSuccess;

    } While (false);

    return the result;

    }

    //***************************************************************************

    #if (csversion_<>

    # define ITextFrameC_ ITextFrame

    #else

    # define ITextFrameC_ ITextFrameColumn

    #endif

    UIDRef text_query_frame (InterfacePtr txt, TextIndex istartPos)

    {

    UID uid = kInvalidUID;

    TextIndex startPos = istartPos;

    do

    {

    If (! txt) break;

    INNERE Textrahmen of the items

    InterfacePtr frameList (txt-> QueryFrameList ());

    If (! frameList | frameList-> GetFrameCount ())<= 0)="">

    First INNERER Textrahmen of the items

    InterfacePtr textFrame (frameList-> QueryNthFrame (0) / * QUF,: UseDefaultIID () * /);

    #ifndef (csversion_<>

    Location of RangeData (startPos, startPos);

    #else

    TextIndex location = startPos;

    #endif

    Int32 frameIndex = - 1;

    InterfacePtr tf = InterfacePtr (Nile);

    If (startPos < txt-=""> tf TotalLength ()) = InterfacePtr (frameList-> QueryFrameContaining (location, & frameIndex));

    of other tf = InterfacePtr (frameList-> QueryNthFrame (frameList-> GetFrameCount () - 1));

    If textFrame (tf) tf =;

    If (! textFrame) break;

    //

    Aus dem first inner Textrahmen bilden wir jetzt eine hierarchy.

    In der Ebene uber hierarchy suchen wir jetzt nach nach einem dieser

    Objekt, das ein Graphicrahmen ist. Dieses element ist der gesuchte

    ÄUßERE Rahmen.

    //

    InterfacePtr child (textFrame, UseDefaultIID());

    If (! child) break;

    do

    {

    InterfacePtr parent (child-> QueryParent());

    If (parent == nil) break;

    InterfacePtr graphicFrameData (parent, UseDefaultIID());

    If (graphicFrameData! = nil)

    {

    We have a regular text frame.

    UID =: GetUID (graphicFrameData);

    break;

    }

    child = parent;

    } While (child! = nil);

    } While (false);

    If (uid == kInvalidUID) return UIDRef (Nile, kInvalidUID);

    Return UIDRef (: GetDataBase (txt), uid);

    }

    //***************************************************************************

    #if (csversion_<>

    # define GLayout_:

    #else

    # define GLayout_ Utils ()->

    #endif

    UIDRef page_getref (const UIDRef & frameRef, int32 * pgNum)

    {

    UIDRef result = UIDRef::gNull;

    do

    {

    If (pgNum) * pgNum = 0;

    If (! frameRef) break;

    InterfacePtr itemHier (frameRef, IID_IHIERARCHY);

    If (! itemHier) break;

    If (! pause frameRef.ExistsInDB ());

    ES more like evil EIB GetOwnerPageUID AB. ICH denke badly, at least

    Ein muss ein Rahmen wohl schon haben Parent. Wenn wir da keinen find,.

    tschüss Dann.

    InterfacePtr parent (itemHier-> QueryParent());

    If (! parent) break;

    PageUID UID = GLayout_ GetOwnerPageUID (itemHier);

    If (pageUID == kInvalidUID) break;

    result = UIDRef (frameRef.GetDataBase (), pageUID);

    If (pgNum)

    {

    IDataBase * db = frameRef.GetDataBase ();

    If (! db) break;

    UIDRef docRef (db, db-> GetRootUID ());

    InterfacePtr PageList (docRef, IID_IPAGELIST);

    If (!.) (Break from PageList);

    Int32 pageIndex is PageList-> GetPageIndex (pageUID);.

    * pgNum = pageIndex;

    }

    } While (false);

    return the result;

    }

    //***************************************************************************

  • How to use the Page number in the IF condition

    Hello

    I have an obligation to change the output based on Page numbers. Can you please help me how to use the Page number in IF condition.

    Thank you

    Can u send me a sample xml and RTF file to my email in my profile identification, so that I can have a look.

  • How to find the serial number for old acrobat version

    Hello

    I have an official serial number for acrobat 9 based on an acrobat upgrade older 6. But for the last I 'can' t find the serial number... How to get it?

    If you purchased or registered with adobe, make sure the account used at the time, Adobe ID

    If its currently installed on an old computer, it can be retrieved from this computer.

  • How to find the serial number for Lightroom 6 autonomous

    I just bought a stand-alone version of Lightroom 6 complete installation in a box retail and try to install it on a Windows machine.

    The installer is one displayed a screen with 6 small boxes where I enter the serial number.  This file on the DVD provided says "You can find the serial number of 24 digits (e.g. 0000 0000 0000 0000 0000 0000) on the back of your door-DVD".  I guess that means that the white paper envelope which contained the DVD.

    There is no number of 24 digits on the envelope.  The back of the envelope contains a small sticker on the lower right corner with two lines.

    -The first line contains a start with the number 9 eight-digit number.

    -The second line contains a mix of 30 letters and special characters starting with DVS/A, LTRM, 6.0, etc.

    (I did not provide the full character set snacks is a unique code for this DVD.)  Please let me know if it needs more.)

    The installation program will accept only characters alpha, only numbers.  Could you please tell me how to locate the 24 digit number he needs.  I can't find it on the envelope.  The box of the product has an Adobe sticker o back, with multiple numbers, but none is a 24 digit number.

    Your help would be appreciated.

    Thank you.

    Problem solved.

    Found the number on the secondary area containing the DVD.

    What is confusing is yesterday I installed Photoshop Elements and the serial number sticker was on the back of the envelope of white paper, not the box insert, so that's where I was initially looking for her.  It's just the opposite for Lightroom.  My suggestion would be to do the things constantly between products.

    Thank you

  • How to reset the page number?

    Hello

    I added the page numbers for the report of OTM app, printing of invoices, using the generator of reports 10.1.2.0.2.
    Everything works fine until someone wants to print multiple invoices at once.

    In this case total and the page number must be calculated separately for each invoice. No idea how to operate?
    Docs Oracle do not help at all, unfortunately.

    DKV wrote:
    Hello

    I added the page numbers for the report of OTM app, printing of invoices, using the generator of reports 10.1.2.0.2.
    Everything works fine until someone wants to print multiple invoices at once.

    In this case total and the page number must be calculated separately for each invoice. No idea how to operate?
    Docs Oracle do not help at all, unfortunately.

    Hi dkv,
    Sorry, docs of oracle have documentation.
    Check http://docs.oracle.com/html/B10602_01/orbr_pagenum.htm

    read at * 19.6 create new fields * desire property is under field, click the field of Page numbering property to display the Page numbers dialog box.

    read everything and you will get all the.

    Thank you

    Hamid

    Mark correct/good to help others to get the right answers. *

  • How can I find the serial number for Adobe Photoshop Elements 6?

    In January of 2012, I bought an Epson Perfection V500 Photo Scanner.  Adobe PhotoShop Elements 6 came with it.  Last week, I bought a new computer.  I installed PhotoShop Elements 6 on the new computer.  Now, PhotoShop Elements 6 wonder a 24-digit serial number.  I can't find it on the Adobe PhotoShop Elements 6 disc provided with the scanner.  I can't find in any of the documentation I got Epson with the scanner.  Where can I find the serial number of 24 digits for PhotoShop Elements 6 so I can transfer PhotoShop Elements 6 from my old computer to the new?

    Unfortunately, if you have never installed it, adobe has no record of your serial number. Serial numbers for the products are sold in large batches, and the buyer (Epson, in your case) is responsible for them. You must get in touch with Epson.

    If you have installed and registered PSE 6, go to adobe.com and search on the right side of My Adobe page. By working through the links you should be able find the record of the serial number that you have registered.

  • How to get the page number

    Sorry, but again I question. I want to select table by ID, where ID should be equal to the current page number. How can I get the page number?

    Davyd

    Try

    where ID = v('APP_PAGE_ID')
    

    Jeff

  • How to find the serial number of the Satellite M30x

    Over time, serial number has worn away from the bottom of my Toshiba Satellite M30x. is there another way that I can know what it is?

    I m not 100% sure, but maybe you can find the serial number in your document that were shipped with the laptop.

  • Satellite A200: How to find the serial number

    I need to know the ETA of my laptop so I can download the specified drivers...
    Cause when I did my search, there are several version of the SATELLITE A200...
    If anyone can help out where I can find it?

    Thank you!!

    At the bottom of the unit, you will find the label that provides all the necessary numbers.
    You will also find the serial number!

  • My laptop was stolen - how to find the serial number

    Hello

    Is there a way I can find the serial number of my laptop, which was stolen yesterday? I would like to save as stolen with Toshiba, but they ask the serial number.

    TNX

    Andy

    Hello

    Usually, the serial number was placed at the bottom of the unit.
    There is a label that brings together all these useful information.

    You have certainly received many documents with you laptop; is guaranteed.
    Check that and maybe you can find the serial number somewhere in the list

  • How to find the imei number of backup

    Hi, I lost my iphone. I have backup and I see on the screen of device management. I want to find the IMEI number and give information stolen from the police.

    See find the serial number and other information for your iPhone, iPad and iPod touch - Apple Support.

    TT2

Maybe you are looking for