How to Get a List of All XMLElements (Follow up to previous posting)

(CS5, Win7, 64Bit)
I need a collection (or array, etc.) of all the XMLElement objects in a given document in flat form (just like the "Structure Tree"'s hierarchichal view - only flatened).
I could not find any "normal" way (i.e., built-in property or method) to get at the information. Instead, I found that I had to recurse through the entire XMLElement tree, starting with the Root Element. For a large document, this can take close to a ten minutes, and sometimes I have to do this for an InDesgin Book containing over ten enormous INDD files.
After "கற்பனை Imagine" responded to my previous post about how to get all the XMLTags, I assumed that myDocument.xmlElements would return a collection of all the XMLElements in the Document. Unfortunately, it does not - it returns only the Root XMLElement. Thus, I have to recurse therough the hierarchy of XMLElements under the Root XMLElement - which takes a very long time.
There HAS to be a better way, right?
Would it be better were I to recurse through all PageItems in the document and then recurse through each PageItem's XMLElement tree? I assume that wouldn't make a big difference either way.
I'm open to suggestions...
TIA,
mlavie

mlavie:
I could not find any "normal" way (i.e., built-in property or method) to get at the information. Instead, I found that I had to recurse through the entire XMLElement tree, starting with the Root Element. For a large document, this can take close to a ten minutes, and sometimes I have to do this for an InDesgin Book containing over ten enormous INDD files.
What do you intend to do with this flat layout of XMLElements? That probably matters a great deal.
If performance is really at play, you can try using XML Rules instead of interacting with the DOM from JavaScript. But they are complicated and confusing and more suited to declarative programming.
Imagine suggests:
var a = myroot.evaluateXPathExpression ("//*");
    xmlObjArray.push(a[b--]);
Why not stop there? evaluateXPathExpression already returns an array, why iterate over it and push its elements into a new array? What's wrong with the return value?

Similar Messages

  • How to get the list of all formtypes in SBO?

    Hello,
    How can i get the list of all available formtype in SBO?
    Each SAP Business One form has a unique type to support multiple instances of the same form. For example, the type of the Purchase Order form is 142, Form=139 for Sales Order.
    Is this information stored anywhere?
    Thanks and Regards,
    Sheetal

    Hi Juha / Sheetal,
    Activating the menus will only help to get the forms which are "directly" accessible...
    ...but there are forms that come up only when clicking some button - or double-clicking - or activating a menu item in the (dynamic!) "Goto" menu etc.
    In 2005 SP01 a new function was introduced (and documented in the SDK Helpcenter) that can be used to iterate over all integer IDs (note there are a lot of gaps) up to 65535 and get information about the form and items on it (specifically the databinding!).
    Please take a look at the ResourceData property of the Application object in UI API!
    Gaps (in A version today - to my best knowledge): 10.000 - 20.000; 21.000 - 40.000; 41.000 - 50.000; 51.000 - 60.000...
    Regards,
    Frank
    <i>Visit the WiKi-FAQ at: https://wiki.sdn.sap.com/wiki/display/HOME/BusinessOneFAQ</i>
    BTW: What do you need that information on "all forms" for?
    Message was edited by:
            Frank Moebius

  • How to get the list of all users

    Hi,
    Is there a way in Grid Control for getting the list of all users on all target databases? I need to count how many Oracle db users in our company.
    Thanks a lot.

    One way to do it might be...
    Assuming you have preferred credentials set up for all of your databases, you could run a 'select username from dba_users or all_users;' against all of your databases through grid control.
    Click on Targets tab, click Databases, then the 'Execute SQL' link at the bottom of the page. Click 'Add' and 'Select All'. Then run it. It's just running the same sql across all of your databases and the output will be at the bottom for all of them.

  • How to get the list of all the security Roles defined ?

    I am trying to programatically get a list of all the roles defined
    in the weblogic. How can I access this information using the exiting
    MBean interfaces.
    thanks
    Prasad

    Wrong forum. Just a hint.

  • How to get the list of all process order which are settled?

    Hello Friends,
    Is there any  standard report available to get the list of all settled  Process Order or  Production order?
    Thanking all of you in advance.
    Regards,
    Jitendra

    Hi,
    You can the below standardreports for knowing the list of Settled Process Orders :
    1. Use Tcode : COOIS and in the selection fields provide the Process Order Type, Plant and System Status As " SETT" and execute the same . System will list all the Process Orders which were settled so far.
    2. Use Tcode : CO26 with selection fields as above.
    Hope this will suffice your reqt.
    Regards
    radhak mk

  • How to get the list of all running process in java

    hi all,
    i want to get the list of all running processes on my system. please let me know if it is possible to do with JAVA. which class i should use?
    waiting for reply
    bye

    Wrong forum. Just a hint.

  • Newbie ques : How to get the list of all tables in the database

    Hi,
    I'm very new to Oracle (using Oracle8i currently). I wanted to know if there is a way to get the list of all tables in the database. Like in mySQL you can use the command " show tables" to get the list of all the tables.
    Any help will e greatly appreciated. Please "cc" any reply to [email protected] also.
    thanks
    Deven

    Hi
    Select table_name, owner from all_tables;
    will give u all the tables in the database.
    all_tables, dba_tables, user_tables
    all_objects, dba_objects, dba_objects
    there are many, more tables. login as system and query the tab and try to describe the tables.
    Thanks
    Malar

  • Reporting In Service Manager 2012 - How To Get A List Of All Service Requests Regardless of Status

    Within the Custom Reporting Options available to users of Ssystem Center Service Manager 2012, which would one use to create reports that do not contain any agregated data but are instead detail level info such as a list of all Service Requests reardless
    of status?  I want to include within the report the same data you see on the main page of a Service Request when you double-click a Service Request within Service Manager and it pops opne the details of the Service Request.
    I'm trying to get the following info for each Service Requests
    SR ID (i.e. SR1234)
    Affected User
    Title
    Description
    Priority
    Source
    Area
    Support Group
    Assigned To
    Created By and Created On
    I know the cubes w/Excel offer a great way to get data for a **piece meal report or for getting agregated data (I.E. counts, sums, avergares, Max's & Mins) but I need a report that has zero totals and no agregations. 
    Thanks
    ** A piece meal report is a report that has to be manually pieced together by combining data from others reports and other sources because no single report can be constructed to bring all the data togethere into a single report.  If you've ever
    worked with an accountant taht uses Excel for everything but who has no idea how SQL or databases in general are deisgned then chances are you've either been asked to create a piece meal report for them and or seen them do one them selves when they open a
    spreadshet and dump into it disperate data from a variety of sources and then ask you why you can't automate that same report for them.

    the following thread covers some good SQL queries to get details about the Incident Request, just amend them to cover the Service Request
    http://social.technet.microsoft.com/Forums/systemcenter/en-US/e703641d-3e05-4df4-be2b-bf9bd62534f8/how-to-generate-incident-report-with-incident-description-field-in-scsm-2012-sp1

  • How to get a list of all the clients logged in to the network

    hiii
    how can i fetch a list of all the users who are currently logged on the network...so that the list can then be sent to a database..plz tel me what techniqe can followed to do this....thanx

    hiii
    how can i fetch a list of all the users who are
    currently logged on the network...Easy, nobody logs onto the network so this is always nobody.
    You may be asking, how do I determine all the users who have logged in to all the PCs on the network.
    Write a program which is added to each user's Startup a program which updates the database with their details. If you have network scripts, this can be added to the user' network login batch script.

  • How do i get a list of all the apps i have purchased this year

    how do i get a list of all the apps  have purchased this year and how much each app was

    Check your iTunes purchase history (click your email address in the upper right corner in the iTunes App Store-> log in -> click Purchase History).  This gives you a comprehensive list of apps you've purchased.
     Cheers, Tom

  • How can I get a list of all my apple ids

    I would like to get a list of all my apple ids ..
    as ive had many macs over the years i have one which i can remeber & i cannot use app store ?

    Hi there darryl53,
    You may find the information in the article below helpful.
    Apple ID: How to find your Apple ID
    http://support.apple.com/kb/HT5625
    -Griff W. 

  • How do i get a list of all Roles defubed under a particular OrganizationalUnit? How can i use LDAPConnection.search method for this?

     

    Sorry for the typographical mistake.
    Please read the question as:"How do i get a list of all Roles defined under a particular OrganizationalUnit? How can i use LDAPConnection.search method for this?"

  • Hi ,How can I get a list of all laptops or users with folder direction enabled or offline files enabled, be it sccm or poerwshell . i have struggled for a week.

    Hi ,how can I get a list of all laptops or users with folder direction enabled or offline files enabled, be it sccm
    or poerwshell . i have struggled for a week
    tchocr

    Hi,
    There is no such PowerShell command can achiev this. Maybe you can use a script to get the user name with folder redirection enabled. However, I am not familiar with writing script, and it would be better for you to ask in script forum below for professional
    assistance:
    http://social.technet.microsoft.com/Forums/en-US/home?forum=ITCG&filter=alltypes&sort=lastpostdesc
    Best Regards,
    Mandy
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • How can I get a list of all workbooks

    Can anybody please tell me how can I get a list of all my workbooks that are on my Oracle Discoverer database without having to manually write them down? I am using Oracle Database 10g Enterprise Edition.

    Hi,
    To implement the EUL Management BA follow metalink NOTE:556932.1
    there are very simple steps you need to perform in order to use it

  • How can I get a list of all my annotations to send to someone else, listed by PAGE #, not order.

    How can I get a list of all my annotations to send to someone else, listed by PAGE #, not order??

    The comments list is sorted by page by default. If it's not for some reason, click the "Sort comments" button and select that option. It looks like this:

Maybe you are looking for

  • HT201210 Can't update iPhone 5 to the latest software 6.0.1

    Trying to update new iPhone 5 to iOS 6.0.1. All works fine except during the required auto backup it starts to back up and they stops saying either that the phone had disconnected (which is hasn't) or that the backup has failed. In both situations it

  • What OS will work on PowerMac G5

    I just bought a Power Mac G5 and it came with no OS. I just installed a new 500 GIG hard drive and tried installing Snow Leopard. However the OS would not load. I did a little more research and found that only Intel base Mac can support OS X (Snow Le

  • IPhoto problum with Photoshop7

    I have the 5.0.4 version of iPhoto and have had no problum with editing photos with Photoshop 6 then transfering them to the library. I recently upgraded to Photoshop 7. Now when I edit the photos and load them on iPhoto the pictures are not sharp ,

  • Why do I get # rather than £ signs in Discoverer?

    When I display text in a formula column in Discoverer i get # signs rather than £'s e.g. Under#80k

  • How do I get photostream which is greyed out - active in icloud?

    Photo stream in icloud on my Macbook air is currently greyed out - how can I change this?