[CS5.5:JS] - evaluateXPathExpression not working - Reg.

Dear All,
I'm working in the below code, but It will return "zero" only.
//================== Code====================//
var mydoc = app.activeDocument;
var rootElement = mydoc.xmlElements.item(0);
var linkElementList = rootElement.evaluateXPathExpression("//chapter/sections/section");
$.writeln(linkElementList.length);
//==================== End : Code====================//
I'm collection all "section" nodes, but it throws "zero" [undefind]...
Does anyone know the proper syntax to use with this?, Please kindly help and advance thanks...
Thanks & Regards
T.R.Harihara SudhaN

All your examples except the first one work for me, you just have to know that it's arrays that you are dealing with when you check the results from your evaluateXPathExpression calls.
A single slash character "/" should be the root node of the document. But I guess it's almost as a meta level, superior to the "document"-reference set to the variable docElement, in your example. Meaning that "/document" will work, but not "/endnote". I'm not 100% sure, but the "/" might never be able to find anything else but the element that evaluateXPathExpression is "run from".
var endnotes = docElement.evaluateXPathExpression("/endnote");
$.writeln(endnotes); // returns nothing (since there are no endnote root elements).
// Returns three "endnote" XMLElements from any level under docElement
var endnotes1 = docElement.evaluateXPathExpression("//endnote");
$.writeln(endnotes1); // Three elements
$.writeln(endnotes1.length);
// Returns three "endnote" XMLElements from the level directly  under docElement
var endnotes2 = docElement.evaluateXPathExpression("endnote");
$.writeln(endnotes2);
$.writeln(endnotes2.length);
$.writeln(endnotes2[0].markupTag.name); // Writes out the name of the first element returned
//The last example returned an array with length = 1, and checking its name returned "document":
self[0].markupTag.name
Result: document
Message was edited by: Andreas Jansson. Changes in the text about the slash character. It does not go to the top of the whole XML document in InDesign, it just acts as a container of docElement (in the example) and nothing else. In the example it happens to be the same as the document root.

Similar Messages

  • Adobe Bridge CS5 in windows 7 not working?

    Adobe Bridge CS5 in windows 7 not working. I was using bridge perfectly for last 2 years. It stops working since 3 days. I tried to install updates. Showing some error to install.
    Tried to install creative cloud..again some error. Error code : 82
    Could you please advice how I can fix my adobe bridge.

    https://www.youtube.com/watch?v=xDYpTOoV81Q&feature=youtu.be
    please check this video I uploaded..this is what happens when I click adobe bridge.. just blinks and go off. bridge not working on task manager

  • CS5 - Mixer Brush - Wetness not working properly

    Hi,
    I'm using the trial version of Photoshop CS5 Extended.
    I'm very excited about the new Bristle Brushes and the Mixer Brush. I think, a nice job was done on these features. However, I think the "wetness" attribute of the Mixer brush is not working as it is intended. I would expect that low setting of wetness would cause the brush to interact less with the underlying color. At the moment, when set to 0% wetness, the Mixer Brush does not interact at all with the underlying color but at 1% wetness it fully interacts with the canvas. There is no perceivable difference between 1%, 50% or 100% wetness. I think this should be fixed in order to enable the full power of the Mixer Brush.
    Apart from that, the new brushes are just awesome. It is the most haptic and expressive brush engine I've ever used.
    Thanks,
    DanieL

    This seems to be a problem with the Bristle Brushes only and is quite annoying considering that the Bristle Brushes are practically made for the Mixer Brush.  Other brushes seem to use the Wetness slider just fine.  Here's an example:
    I hope Adobe fixes this in a patch.

  • URGENT - saving from CS5  to .idml is NOT working...

    He guys,
    I need to save my CS5 indd file to idml.
    As I have done it before and know what to do, for some reason its not working anymore.
    What I mean to say, my computer just won't do it, it says its busy but after hours, nights en anymore nothing is happening.
    I end up foricing my computer (macbook) to quit...!!
    And when wanting to close indesign, it says its busy!?
    The file isn't that large and there are no errors or whatsoever in the file...
    Did anyone have the same prooblem? And how to fix it...?
    It's real urgent and need your help!!!
    Please, thanks, a desperate dutch design student.
    Saskia
    [email protected]

    I have seen this, as have many others. First thing you need to do is update InDesign to 7.0.4 (the latest patch for CS5). This fixes some causes of the problem.
    If that doesn't solve the issue, see if you can do it in halves, then try halves of any part that fails, until you isolate a page that is the problem. There is probably a corrupt image or text frame on that page.

  • CS5 Crop Tool Presets Not Working - HELP!

    I am using CS5.  The Photoshop crop tool presets are not working.  For instance, if I use the Preset 8 inch x 10 inch and drag on an image which is say 12 x14 the crop does not stop at 8x10 but continues on to cover the whole image OR it covers only a portion of the image but the size of the crop is NOT 8x10 - it might be 10x12. 
    Actually there doesn't seem to be any rhyme or reason to what it is doing.
    I have cleared it, reset it, saved (my own presets) and reloaded.  I have closed out of Photoshop and even rebooted my computer. 
    Any Ideas what is going on and how to fix it?  All help will be greatly appreciated.
    Regards, Getting Really Annoyed

    It's kinda hard to tell from your description, but try the following
    and see if it helps:
    Make sure you don't have any values entered in the tool options bar
    for the width, height and resolution. If you do, use the clear button.
    If still not working, try resetting the photoshop preferences:
    Hold down the shft+alt+ctrl keys while starting photoshop, continue holding the keys
    until a dialog appears asking to reset the settings file, click yes.
    MTSTUNER

  • CS5 Aplha Fade Out Not Working

    Has anyone encountered the alpha fade in CS5 not working when fading a graphic out? Example, I want to fade out a graphic symbol from 100% to 0%. When I try to make my fade to 0%, the alpha slider snaps to 100%. Hopefully someone can help out.

    Okay, I think it's faster with a visual. Let's focus on the "train" layer. As you see I have four keyframes, the first set fades up from 0 to 100 and the last set is supposed to fade out from 100 to 0 but the the last keyframe where the playhead is, won't go to 0.

  • CS5 Refine Edges tool not working how its suppose to

    Hello everyone - well I like the title says refine edges tool not working right -
    I open an image in photoshop - make a quick selection of a part of the image and then go into refine edges - Click on smart radious and when I use the brush to get a better selection that part becomes transparent - I tried seaching everywhere for an answer but noone seems to know
    Thank you

    Could you please post a screenshot with the pertinent Panels visible?
    The videos you might have seen might simply be using images that lend themselves to the task better than your image.

  • Looking for good sound module/card for AE CS4 and AE CS5.5 Echo Audio not working proper

    Hi,
    I have two different computers, one with AE CS4 and a other one with AE CS 5.5.
    On both systems ( Windows 7 64) my Echo audio fire4 sound-module driver is not working proper
    and crashing AE. Despite the latest updates from Echo. When I uninstall the driver the problems
    are gone!
    That's the reason I'm looking for a good stable sound-module (FireWire) to work with Premiere Pro
    and AE.
    Thanks! David

    Hi,
    I have two different computers, one with AE CS4 and a other one with AE CS 5.5.
    On both systems ( Windows 7 64) my Echo audio fire4 sound-module driver is not working proper
    and crashing AE. Despite the latest updates from Echo. When I uninstall the driver the problems
    are gone!
    That's the reason I'm looking for a good stable sound-module (FireWire) to work with Premiere Pro
    and AE.
    Thanks! David

  • Dreamweaver CS5.5 File Compare not working on Mac

    It's not working at all, and I have TextWrangler as the application for this feature.  Can somebody help?  I've asked this question before and nobody has been able to help.  Should I reinstall it?  FYI, I'm new to a Mac.

    exactly the same here. Also I posted to a similar, slightly older thread already: http://forums.adobe.com/message/4116260

  • BUPA_MAIN filter not working-Reg

    Hi ALL,
    In R3AC1, I want to put filter for BP with account group Y001 to Y005.
    I tried it in R3AC1 and its not working and still changes(DELTA) in BP belongs to this account groups are flowing to R/3.
    Currently we are 7.0
    In the below thread they are saying that we need to create ZFUNCTION MODULE...is it required? Pl suggest.
    How to restrict contact person from ECC to CRM
    Regards
    A.SURESHBABU.

    Hello,
    R3AC1 filters are only meant to limit the flow of data from R/3 to CRM. So if you want to filter BP data flowing from CRM to R/3 I think R3AC1 won't help.
    For this purpose you can filter the BP upload by using intelligent subscription (t-code SMOEAC). You need to replace the bulk subscription with intelligent subscription and define your own crieteria fields which controls the upload.
    Thanks,
    Rohit

  • Adobe Illustrator CS5 (ALT DRAG COPY) not working. Why and how do I fix it?

    I click on the object I want to duplicate, then I click ALT (double duplicate arrows appear) and then select the object (double duplicate arrows disappear), then I drag and nothing duplicates or copies...all it does it move the object I was trying to copy. How do I fix this?

    jokerlex,
    You may be lucky to have one of the easy ones at the top work.
    The following is a general list of things you may try when the issue is not in a specific file (you may have tried/done some of them already); 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to 3 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • CS5 Extended Adobe Bridge Not Working

    I am using CS5 Extended Adobe Photoshop Student and Teacher Edition. It was working properly not 'til I installed Check It Registry Cleaner this morning. When I started to work on certain pictures I took this afternoon, and I open Adobe Bridge so I can drag the photo on the main layer and use refine edge, I do not see the "+" while dragging the photo. In this regard, do I have to uninstall CS5 Extended Adobe Photoshop and re-install again. On another note, I turned off the computer and tried to see if it will work properly, but it will not drag the photo to the main layer so I can use refine edge. Your response in this regard is greatly appreciated.

    Please read this and proceed accordingly:
    http://forums.adobe.com/thread/419981?tstart=0
    If the problem is with Bridge please refer to
    http://forums.adobe.com/community/bridge
    As for general troubleshooting advice for Photoshop check out
    http://blogs.adobe.com/crawlspace/2012/07/photoshop-basic-troubleshooting-steps-to-fix-mos t-issues.html

  • Photoshop CS5 Issues & Mini Bridge Not Working In CS5

    I have Photoshop Issues:
    Mainly with copy & paste tools after a short period of time, tools start to function incorrectly for example.. Copy & Paste when working with identical images & wishing to select a part of the image to paste directly on top off the identical image they do not align up pixel by pixel I zoom a 100% in to see and ifs off shifted by 1 pixel out If I move it into place it jumps 2 pixels to the left and if I move to the right again 2pixels. I can't get it in the precise place
    it normaly happens after Ive made a couple of pastes.. till I end up having to close & restart photoshop to get it functioning correctly. Is this a bug or am I using it indifferent.
    Also the Clone stamp tool stops functioning after using the copy and paste tool after short periods. Example I copy then paste a selected part of the image back into the image then wish to the clone stamp tool to get the correct texture right.
    And last issue is.. Mini bridge does not load I click browse images & it states "Waiting for bridge CS5.." ? Nothing happens
    Windows Xp Media Centre Edition: (Service Pack 3)
    staceyparish @ live dot co dot uk

    It's worth checking to see if the "jumping" problem you have is because Snap is enabled.  Snap causes Photoshop to try to auto-align things for you, and can look much as you've described.  Check the View menu to see if Snap is checked.  If so, either uncheck it, or hold the Control key down when you are moving things that you wish to align without snap.
    Also, keep in mind that with the Move tool selected, you can "Nudge" a layer by one pixel at the current zoom level by using the arrow keys on the keyboard.
    Can you list specific steps to reproduce the Clone tool failure?  It might also be helpful for you to capture your screen showing the current state of the image, layers, and settings at the time you're seeing the Clone tool fail to work as you expect.  You may have a setting wrong that someone will be able to see.
    -Noel

  • CS5 Photoshop/Bridge/Suite not working on new Retina Macbook Pro, running Mavericks 10.9.2

    I recently purchased a new Retina MacBook Pro laptop running Mavericks OS X 10.9.2. I had Apple perform a data migration of all my apps and files from my older laptop onto the new one. Now when I go to open Photoshop CS5 I receive the following error message, "Could not synchronize the color settings because of a program error." Photoshop will then open but I can't do anything in the app. When I go to quit Photoshop I get this error message: "Could not save Preferences because the file is locked or you do not have the necessary access privileges. Use the 'Get Info' command in the Finder to unlock the file or change permissions on the file or enclosing folders."
    I am able to open Bridge, however the app in entiretly is noticeably lo-res and pixelated looking, so clearly something is not up to speed there either.
    InDesign and Illustrator are also having issues.
    I have run the System Update and it does not show anything in the CS5 Suite needing to be updated.
    Please advise! Thank you.

    I do not get the Airplay icon on my Macbook's menu bar. I have checked the box in the Display settings to show mirroring options but still no icon. Airplay Display shows 'No device Detected'. Both AppleTV and MacBook Pro are on the same physical Network (192.168.1.0/24) and connected directly to my home ethernet switch (not wirelessly). I also made sure MacBook's Firewall is disable. Airplay feature use to work before upgrade to 10.9.2. As far as Home sharing from my AppleTV has a similar issue; it just does not find my MacBook after a while of loading and searching my music library. I am logged in to icloud on both devices (appletv and macbook). Also use to work before upgrade. Any ideas or recommendations. Thanks.

  • InDesign CS5.5 Style sheets not working properly

    Hello,
    I'm checking out a trial version of InDesign CS5.5 and am creating some paragraph style sheets that don't seem to be working. When assigning the latest style I've created to a paragraph, it changes the color I've spec'd, but not the typeface. I open up the style to make sure I've selected the typeface, and it's in order. It just won't style the paragraph with it. What might be going on?
    Thank you in advance for any advice. It's making me crazy.

    @Helenac:
    to force a paragraph style with all defined attributes to a paragraph regardless of local formatting and applied character styles, hold the "alt" + "shift" keys when applying the paragraph style.
    If you want to preserve character styles and overwrite local formatting, then hold the "alt" key when applying the paragraph style.
    Uwe

Maybe you are looking for

  • Doubt in case when statement

    hi gems... i have a case when statement in a select clause...there are total three conditions in the case when statemnt. now my question is if all theconditions gets matched, then what will happen??? is only first condition gets executed and rest two

  • RunTime Exception while reading the file

    Hi, I am using aixs1.0 for my current project. I have uploading an image file. if the file is in c: drive then upload successfully. if the file is in desktop it gives socket connection exception. while the desktop name is with .v example.c:\documents

  • Worried about slamming

    Hi, I had never heard of slamming until today.  A couple of hours back I had a phone call claiming to be from BT, they said as I run a business from home I can get cheaper calls and line rental. They went on to say BT was split into different compani

  • Problem attaching file in SRM

    While accepting offer from a supplier, before transform it in a purchase order, it'd like to attach a file. It doesn't matter which kind of file (.doc,.xls,.txt,etc...) I've tried all type. I'm doing it pushing on "Upload" button, but it seems i'm no

  • Where is mail stored under Tiger?

    I want to back up old correspondence, both outgoing and incoming. Where are they stored? Thanks.