How to find out the page number of an xml element

Hi everybody, sorry for my very bad english (french guy! logical). I hope you see what I'm looking for.
I'm scripting (javascript) an exporting script of every articles from a multi-pages indesign script.
In fact I could have one or more article in one file, every one of them is on an separate xml element. for each I have to export an xml file named with, first, the page number where appears the xml element, second, the number of exported article.
I'm success the second purpose, but not the first.
Someone have an idea ?

Try this,
var myDoc=app.activeDocument;
var root = myDoc.xmlElements[0];
var docTag = root.evaluateXPathExpression('//doc');
for(i=0; i<docTag.length; i++)
    var docPos = docTag[i].insertionPoints.lastItem();
    var docFrame = docPos.parentTextFrames[0];
    var docPage;
    try
         docPage = docFrame.parentPage;
catch(e)
        docPage = docFrame.parent.name;
    alert(docPage.name);
Vandy

Similar Messages

  • How to find out the page number a cell is on

    Hi folks,
    after importing a XML table into an InDesign document and autofilling it, I need a way to find the page a specific table cell is on.
    I tried to iterate over all cells but it seems that there is no property or so, which tells me which page the current cell is on.
    I really would appreciate any hints how I could tackle this problem...
    TYIA
    Carsten

    @Carsten – try the following:
    myPageNumberStartingWithZero = myCell.texts[0].insertionPoints[0].parentTextFrames[0].parentPage.documentOffset;
    Instead of a number, you could also ask for the "name" property of the parentPage. But this might not be unique…
    Uwe

  • How to find out the Idoc number triggered for any material transfer frm SAP

    Hi Folks,
    Can any body let me know How to find out the Idoc number triggered for any material transfer frm SAP?
    Do we have any navigation for that in MM03?
    Thanks,
    SPMD.

    Hi Shabbirmdpasha,
    If you know the user name then you can find the idoc numbers created by that user. But the problem here is it not only gives the material it gives all the idocs created by that user. Go to SE16 --> table name EDIDS --> here you can fill the approximate date and in UNAME give the userid and execute. This will give all the idocs created by that user. I know it is only a partial solution.
    Also would suggest to post the same in abap forums for more answers:
    ABAP Development
    Regards,
    ---Satish

  • How to find out the IDOC number(urgent)

    hello every one,
    i had recived all the data to BW from R/3 but the request is still running in the system
    for this <b>i need to manually release the IDOC for BD87</b>
    can any one please help me <b>How to find out the Idoc Number in R/3 and In BW for the particular load</b>
    Regards
    Sandy

    hi Siva,
    thanks for ur valuable answer,
    it is showing IDoc num for the succeeded one....
    my present error is Data pack 1 got error and Datapack 2 was success,
    their 3IDocs are their in detail tab all are success
    as per my knowledge it will for the Data pack 2 and it is showing 3different
    how can i find the Idoc which was struck .....
    that need to process manually in BD87..
    please suggest if i am wrong
    Regards
    Sandy

  • How to find out the n number of records inserted??

    In File to JDBC Scenarios, i am inserting n records in Oracle.
    How to find out the n number of records inserted??

    Hi,
    If you are using the statement "UPDATE_INSERT", get the response on element <insert_count>count</insert_count>. It will give you the inserted rows.
    This link can be very helpfull.
    [http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm]
    regards.
    roberti

  • How to find out the serial number of a connected AP

    Hi.
    We are using Cisco Prime Infrastructure Manager 2.0
    My question is: Is there a possibility to find out the serial number of a connected AP?
    Regards
    Markus

    Hi Markus,
    I don't think ,there is any report which can help to get the serial no of AP.
    Inventory( Report >Report Launch Pad> Inventory)  is the ONLY report which gave the below information but NOT the serial no .
    Inventory
    This report allows you to generate inventory-related information for  controllers, access points, and MSEs managed by Prime Infrastructure.  This information includes hardware type and distribution, software  distribution, CDP information, and other statistics.
    *** If anyone knows more deatils on this ,please share with us ***
    Thanks-
    Afroz
    [Do rate the useful post]

  • My laptop was stolen - How to find out the serial number

    Hi
    Is there any way I can find out the serial number of my laptop, which was stolen yesterday? I'd like to log it as stolen with Toshiba but they ask for the serial number.
    Tnx
    Andy

    Hi
    Usually the serial number was placed at the bottom of the unit.
    There is a label which collects all these useful informations.
    You have certainly received many documents with you notebook; i.e. warranty.
    Check it and maybe you will find the serial number somewhere in the list

  • How to find out the current number of rows in a form without navigation

    Hi.
    Is there any way to count the rows in a form (block) without navigation to the last record?
    I am modifying CUSTOM.pll and have to count the rows before user commits changes.
    All records are new in this case. Can anyone halp me? Thanks.
    Regards
    Tomáš

    Magoo wrote:
    no, such a block-property ^unfortunately^ does not exists.
    you can just go to to the block, call the last_record build-in and find out, where the cursor is.
    But with this you call restrictred procedures and their are not everywhere allowed ...
    If you execute a query on a block, may not all records getting retrieved from database.
    For this forms does not know, how many records are really in the block and
    for this there is no build-in like get_block_property ( records_count ).It does exist indeed. GET_BLOCK_PROPERTY('BLOCK',QUERY_HITS);
    Of course, this will return the number of records that would get fetched to the block (based on the where condition), but not the records with NEW status (i.e new records which are not yet committed).
    -Arun

  • How to find out the page break in the scripts?

    Hi Friends, this is very urgent, plz help me,
    I want to initialize one field(&script-counter&) at each page break. so how can I find out when the page break has occured?
    regards,
    Venkat.

    Hi Naresh,
    here it is automatically continuing with new page(once the first page is completed). but I just want to know when that new page had triggered.
    regards

  • How to find out the serial number of Satellite M30x

    Over time the serial number has worn away from the bottom of my Toshiba Satellite M30x. Is there any other way I can find out what this is?

    Hello,
    you want to know your serial number / model number but the sticker/manual got lost?
    Here is the solution:
    All of these informations are stored in the DMI of your BIOS and can be read easily with a tool called DMIviewer. (size 146kb)
    This utility can NOT harm your notebook in any way as it is made to READ (VIEW) the DMI only compared to other tools that can do changes aswell.
    It also runs right out of the box without the need for an installation... a must have utility for everybody ;)
    You can download it by clicking the link below:
    http://anonym.shareinside.net/?http://tinyurl.com/yuded9
    After you run the file, click on <DMI--System information (Type-1)> ... here is your info :)
    also check out the entries in <DMI--System Board information (Type-2) for the mainboard serial number.
    Regards
    electrochain

  • How to find out the mobile number of the mobile phone?

    Hi,
    I have a question concerning the mobile number of the mobile phone a pushregistry application is installed on.
    At first start of the program i do a HTTP GET Request to a webserver. I would like to send the mobile number from the mobile phone in order to identifty the request stamps from.
    Thanks

    Are you serious? But you can receive SMS, and you can send SMS, both of them should now where they go to or where they stamp from?
    Can't I use WMA in any way to obtain the number?
    I mean, if I can send an sms to someone then I should be able to determine my mobile number?
    One way to solve this problem: I could send an SMS to a static number, this client sends back an SMS with the receiver number within the payload text..
    but isn't there a more elegant solution?

  • How do I find out the phone number in a new house?

    I have recently moved into a new student house and I am struggling to set up the Internet because I cannot retrieve the landline number from the previous tenants plus we don't have a phone at the house either. Is there a way I can find out the landline number online? Help!

    OldGold wrote:
    Then 17070 won`t work ether.
    17070 is normally allowed on stopped lines, as it enables field engineers to do pair identification. Sometimes 1470 needs to be added as a prefix, if the number was withheld.
    Where possible, old phone lines are left with "soft" dial-tone, as it saves extra work when a new line is provided, and encourages new customers.
    Some service providers insert a recorded announcement if someone tries to dial out. "Welcome to XXXX service provider, please dial XXX to activate this line"  or something similar.
    There are some useful help pages here, for BT Broadband customers only, on my personal website.
    BT Broadband customers - help with broadband, WiFi, networking, e-mail and phones.

  • How can I find out the apn number of the battery without having it?

    I dont have the battery of my iphone 5 anymore but how can i find out the apn number of the battery? I would like to change it but i need to know the apn number to choose the right battery.

    Apple does not provide any user-serviceable parts (other than accessories or sometimes a SIM card tray).
    Therefore, there are no legitimate iPhone batteries available for sale anywhere.
    Anything you find will either be salvaged, counterfeit, or stolen.

  • How to find out the Number range object for Incident number

    How to find out the Number range object for Incident number ?
    CCIHT_IAL-IALID
    regards,
    lavanya

    HI, an example.
    data: vl_num type i,
          vl_char(6) type c,
          vl_qty type INRI-QUANTITY,
          vl_rc type INRI-RETURNCODE.
    CALL FUNCTION 'NUMBER_GET_NEXT'
      EXPORTING
        NR_RANGE_NR                   = '01'
        OBJECT                        = 'ZRG0000001'
       QUANTITY                       = '1'
      SUBOBJECT                     = ' '
      TOYEAR                        = '0000'
      IGNORE_BUFFER                 = ' '
    IMPORTING
       NUMBER                        = vl_num
       QUANTITY                      = vl_qty
       RETURNCODE                    = vl_rc
    EXCEPTIONS
       INTERVAL_NOT_FOUND            = 1
       NUMBER_RANGE_NOT_INTERN       = 2
       OBJECT_NOT_FOUND              = 3
       QUANTITY_IS_0                 = 4
       QUANTITY_IS_NOT_1             = 5
       INTERVAL_OVERFLOW             = 6
       BUFFER_OVERFLOW               = 7
       OTHERS                        = 8
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    vl_char = vl_num.
    write vl_char.
    Regard

  • How to find out the number of songs in my iTunes 11 library

    How to find out the number of songs in my iTunes 11 library

    Welcome to the Apple Support Communities
    To see the number of songs, go to View menu > Show Status Bar, so the number of songs you have will appear at the bottom of the iTunes window

Maybe you are looking for

  • How to add button in standard SAP transaction

    Hi All, I would like to know how to add a button in the application toolbar of the standard SAP transaction CO01/CO02. Is there a screen exit for this? Hope you can help. Thanks Regards, April

  • Electronic Bank Reconcilitiation errors

    Hi experts, Kindly help me please.  I used tcode FF_5 to import the header and line files into SAP and unfortunately I got the ff errors : 1. Statement 201001355 is not in the bank data storage. - Details :  We are importing the statement number 0135

  • Resizing websites to optimize for the most common screen size

    Hi, I have recently designed and produced my first website.  When designing it I looked at the pixel sizes of the range of screens in our office (no widescreen), and I have designed it to suit.  The website fits fine on our screens in our office, but

  • Final Cut Pro 5.1.4, iMovie 7.1.4 and Sony tapes - help...

    So I have about an eight year-old Sony TRV 330 camcorder and am desperate to transfer old tapes to iMac - got rid of old Windows Vista to get an iMac that'd make this possible. Hooked it up numerous times (firewire/IEEE 1394, camera) opened iMovie 08

  • Semi acoustic recording well

    Hi I have a semi acoustic guitar and am recording direct from the guitar into the m-audio 440. How can i make the sound of it less tinny and fuller like on a album? Thanks