[CS3/CS4 JS] How can you get the associatedXMLElement of a merged cell in a table?

Hi!
Inserting a table, and autotagging it, I get a table with a number of cell elements in the XML Structure.
Selecting an item in the table, I can find the associated XML by the following line of code:
app.selection[0].associatedXMLElement
My problems begin when cells are merged. Then the associatedXMLElement for the cell returns null.
How can I find the associatedXMLElement for a merged cell?
Using the getElements makes no difference.
app.selection[0].getElements()[0].associatedXMLElement
(returns null)
In the XML structure I can see that the merged cell is still associated to an XML Element, which becomes underlined and also referrs back to the cell, selecting it when double clicking the XML Element link in the structure.
Is there no way to get to the xml element of a merged cell?
I have tested in CS3 and CS4 as well, and they act in the same way.
I also found a similar, unanswered, question from Anne-Laure Jallon in the "With CS3, some things have changed" ( http://forums.adobe.com/message/1105813#1105813 ):
Hello,
I'm working with VBscript.
Is there a difference between cell.associatedXmlElement in CS2 and CS3?
All my cells in CS2 had an associatedXmlElement.
In CS3, my table has an associatedXmlElement, but all its cells don't (The value is Nothing)
Is this a bug? Is it linked with XML evolution?   Thanks Anne Laure
Adding some more info:
I made a test, by selecting the XMLElement in the structure, and from that object finding the cell, and finding back to the assiciatedXMLElement:
app.selection[0].getElements()[0].cells[0].associatedXMLElement
Result: [object XMLElement]
So that kind of "chain" works.
But with the merged cell as only reference, I can't find its associatedXMLElement. Any ideas would be appreciated.
Best regards,
Andreas Jansson
Message was edited by: Andreas Jansson

In my opinion, locate a cell according to his content is not so effortable. What happens if contents of more than two cells are equals?
I take xml elements of associated xml element of table and put them into an array.
This array contains associated xml elements of every cell ordered by cell positions into table.
Now, locate associated xml element of a cell based on its array position (index) is more reliable:
var myCell_cell = app.selection[0];
var myElement = myCell.associateXMLElement
if (!myElement || !myElement.isValid)  {
     var table =  myCell.parent;
     var xml_tab = table.associatedXMLElement;
     var xml_cells_arr = xml_tab.xmlElements.everyItem().getElements();
     var idx = myCell.index;
     myElement = xml_cells_arr[idx];
Alex ;-)

Similar Messages

  • How can you get the schedule of a single reoccurring job with Restart ability in Redwood to pause when it has failed...?

    We need the Request Restart ability when scheduling a single reoccurring job in Redwood. Most of our jobs are scheduled in CHAINs which offers the Final Status Handler on Step level, and the schedule is "paused" when a job in the CHAIN has failed ( the next instance does not populate until the OP MSG has been Replied to) , and once the OPERATOR message is replied to, the CHAIN can resume running again ( desired ) . But we need this same ability when scheduling a single job not in a CHAIN. In our testing, we set up a job with Request Restart chosen on the Error , Killed and Unknown selections on the Restart Behavior Tab. But we found when a job is scheduled say once a day at 8AM, and when it fails, an OPERATOR msg appears allowing a Restart choice ( desired), but the next day's schedule also populates ( undesired) and we do NOT want the schedule to continue on yet because we need a chance to fix the error before the next insance runs for business reasons. So how can you get the schedule of a single reoccurring job with Restart ability in Redwood to pause when it has failed...?

    Hello Fran,
    You can wrap the job chain in a master job chain in the first step and set the final status handler there.
    You can also set the Restart Behavior to 'Stop Submit Frame', in that case you will have to resubmit the job once you are finished troubleshooting.
    Regards Gerben

  • How can you get the apple tv to work in a hotel where to get on the wifi you have to still go to a website first and put in your room

    How can you get the apple tv to work in a hotel where to get on the wifi you have to still go to a website first and put in your room?

    Welcome to the Apple Community.
    Unfortunately the Apple TV doesn't have a web browser so you can't do that.

  • How can you get the filter off if you can't remember the password? It's"pro con" and it wont even let me check out the rates for aflight.

    How can you get the filter off if you can't remember the password? It's"pro con" and it wont even let me check out the rates for aflight.

    You can check the file prefs.js in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder] and remove the line(s) related to that extension (procon.password).

  • How can you get the keypad on a USB keyboard to work in Excel

    How can you get the keypad on a USB keyboard to work in Excel for Mac.  Mouse keys is disabled/unchecked, but cannot get it to work.  Even tried downloading a 'num lock' app and it didn't help.

    Hi Michael-
    I do not have any problem with using shift registers in timed loops.  What version of LabVIEW are you using?  Can you please elaborate on why neither shift registers or local variables meet your needs?  I have attached a VI that saves a previous iteration and then computes and displays the difference.  Let me know if you have problems running it.
    Thanks-
    Tom W
    National Instruments
    Attachments:
    TimedLoop_ShiftReg.vi ‏74 KB

  • How can you get the mail boxes in yahoo onto the e.mail app

    How can you get your yahoo mail boxes onto the e.mail app on an IPad mini?

    Go to the Settings App
    Pick Mail, Contacts, Calendars
    On the right side you'll see under the Mail section "Add Account”
    Pick that and fill out the requested information

  • How can you get the car stereo to play songs on nano in order?

    Hi--I just got an ipod nano and connect it to my car stereo via a usb port.  No matter what controls I try (on the car) it just plays songs in alphabetical order of the song (regardless of the album title).  How can I get it to play in the order I want (like one album at a time)?

    Mine does. If you can browse by artist, album or song titles, chances are it can brwose through playlists as well. Also make sure that you don't have shuffle selected.
    The iPod should play songs in the order that they are listed on the display.

  • [CS3] How can you get the effectivePPI or similar for an EPS?

    Hi!
    Is there any way of getting out the equivalence of effective ppi for an EPS image?
    Trying to read it out by the effectivePpi[0] results in:
    Error: A value is not available for this type of image.
    It's not present in the info palette of the user interface (and then of couse not in the scripting model). Is there a way of calculating it?
    I can get the absoluteHorizontalScale...
    Need to know if the image conforms to a certain standard, and the input is the required (effective) ppi, such as 300 ppi.
    Kind regards,
    Andreas

    No, they are photos (bitmapped) and they all seem to be saved in Photoshop.
    I opened some of the files with notepad, and read the first lines. I find the words: "Adobe Photoshop CS Windows".
    I also notice another thing about these troubeling files: they all have the following text in the Info panel in InDesign:
    "ICC Profile: CSA".
    Hmmm... could this disturbe the ppi property?
    If I save the file under a new name, and uncheck the "Postscript Colour Management" checkbox, the result is an EPS file with readable PPI values!
    Do I have to tell my customer that she has to save all images without Postscript Color Management?
    Kind regards,
    Andreas

  • HT5787 How can you get the pin # you set for as your "Restrictions" reset if you can't even remember it ?

    For the children we turned on the restrictions on certain apps/features for iTunes and restricted all access to App Store (kids playing with phone, never know what they might do) but now want it off but can't remember pin? How can I find out about resetting the pin and turning off restrictions?

    You can not recover the pin.
    You will have to wipe the device and restore as new.
    http://support.apple.com/kb/HT1414

  • How can you get the itunes app onto your computer so I'm able to get music off my ipod?, how can you get the itunes app onto your computer so I'm able to get music off my ipod?

    i got a new computer and im unable to get the itunes app on there to conect my ipod to it and get my music and pictures off of it. does anyone know how im able to download itunes on a laptop?

    Click Itunes at the top of this page and download it.
    The ipod is not a storage/backup device.  The sync is one way - computer to ipod.  The only exception is itunes purchases:  File>Devices>Transfer Purchases
    You should copy everything from your old computer or your backup copy of your old computer, to your new one.

  • How can you get the serial number of your ipod touch when it has been lost?

    My daughter took her ipod touch to a friends house and it is now missing...can anyone tell me how to get the serial number so that we can report the missing device?  Thanks to anyone who can help.....

    On the syncing computer go to iTunes>Preferences>Device and hover the mouse pointer over the iPod backup and the SN will show in a box.  Also see:
    iPod: How to find the serial number

  • How can you get the dashes to appear inbetween phone numbers

    Is there anyway that I can get the dashes to appear so phone numbers do not look like a big block of numbers.  so instead of 18001234567 is goes 1-800-123-4567.  I looked in options and it does not look like it is possible

    Hi,
    The dashes aren't necessary for the actual call so the Blackberry doesn't waste space (memory) holding the character.
    Make sense?
    Click Accept as Solution for posts that have solved your issue(s)!
    Be sure to click Like! for those who have helped you.
    Install BlackBerry Protect it's a free application designed to help find your lost BlackBerry smartphone, and keep the information on it secure.

  • Ipod 5th generation stuck in headphone mode how can you get the ipod out of headphone mode?

    My iPod touch 5th generation is stuck in headphone mode and when you out headphones in it say ipod needs to cool down before use? How can this be fixed?

    - Make an appointment at the Genius Bar of an Apple store.
      Apple Retail Store - Genius Bar
    Unless covered by warranty,
    Apple will exchange your iPod for a refurbished one for $99 for 16 GB 5G and $149 for the other 5Gs. They do not fix yours.
      Apple - iPod Repair price                                                             

  • How can you get  the public variables from object that extends JLabel?

    I'm using the mouseClickedListener method e.getComponent(); to get the component that is clicked on the sceen. The component i clicked is type "object" and extends a jlabel, and i really need to acces a variable from it. Heres the code i'm using-
    MouseListener listenerDown=new java.awt.event.MouseListener() {
            public void mousePressed(MouseEvent e){
                paintAll();
                mX=e.getX();
                mY=e.getY();
            public void mouseClicked(MouseEvent e) {
                Component c = e.getComponent();
                drawResizeBox(c);
                selected=c;
            public void mouseReleased(MouseEvent e) {
            public void mouseEntered(MouseEvent e) {
            public void mouseExited(MouseEvent e) {
    package javapoint;
    import java.awt.Color;
    import java.awt.Graphics2D;
    import java.awt.Image;
    import java.awt.Rectangle;
    import java.awt.RenderingHints;
    import java.awt.geom.Line2D;
    import java.awt.image.BufferedImage;
    import javax.swing.Icon;
    import javax.swing.ImageIcon;
    import javax.swing.JLabel;
    public class object extends JLabel{
        public object(Rectangle rect,int id){
            idNum=id;
            Rect=rect;
            BufferedImage image = new BufferedImage((int)rect.getWidth()+1, (int)rect.getHeight()+1, BufferedImage.TYPE_INT_ARGB);
            Graphics2D g = (Graphics2D) image.getGraphics();       
            g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
            g.drawRect((int)rect.getX(), (int)rect.getY(), (int)rect.getWidth(), (int)rect.getHeight());
            Icon icon = new ImageIcon((Image)image);
            setIcon(icon);
            setBounds((int)rect.getX()-1, (int)rect.getY()-1, (int)rect.getWidth()+1, (int)rect.getHeight()+1);
            mainFrame.slideArr[mainFrame.sIndx].add(this);
            setVisible(true);
            r=true;       
        object(Oval oval,int id){
            idNum=id;       
            setBounds(oval.getX(), oval.getY(), oval.getWidth(), oval.getHeight());
            getGraphics().drawOval(oval.getX(), oval.getY(), oval.getWidth(), oval.getHeight());
            o=true;
            setVisible(true);
        object(Line2D line,int id){
            idNum=id;       
            setBounds((int)line.getX1(), (int)line.getY1(), (int)line.getX2(), (int)line.getY2()); //Not gunna work
            getGraphics().drawLine((int)line.getX1(), (int)line.getY1(), (int)line.getX2(), (int)line.getY2());
            l=true;
            setVisible(true);
        object(Icon icon,int id){
            idNum=id;
            setIcon(icon);
            setBounds(50,50,icon.getIconWidth(),icon.getIconHeight());
            i=true;
            setVisible(true);
        void drawObject(object obj){
            if(r){
                Rectangle rect=obj.Rect;
                setBounds((int)rect.getX()-1, (int)rect.getY()-1, (int)rect.getWidth()+1, (int)rect.getHeight()+1);          
                Rect=rect;
                BufferedImage image = new BufferedImage((int)rect.getWidth()+1, (int)rect.getHeight()+1, BufferedImage.TYPE_INT_ARGB);
                Graphics2D g = (Graphics2D) image.getGraphics();           
                g.setColor(Color.red);
                g.drawRect(0, 0, (int)rect.getWidth(), (int)rect.getHeight());           
                Icon icon = new ImageIcon((Image)image);
                setIcon(icon);
            }else if(l){
            }else if(o){
            }else if(i){
        public boolean r=false;
        public Rectangle Rect;
        public boolean o=false;
        public Oval Oval;
        public boolean l=false;
        public Line2D Line;
        public boolean i=false;
        public Icon Icon;
        public JLabel label;
        public int idNum;
    }Edited by: ghostbust555 on Feb 12, 2010 2:14 PM

    ghostbust555 wrote:
    Well see the problem is i have an array of 200 objects.What does that have to do with anything? And if it does, why isn't it in the code you posted?
    I dont understand what you mean in your "Edit..." part. could you show some code/ explain farther? sorry if its a dumb question I'm still a bit of a novice at java.Yeah.
    object yuck = (object) e.getComponent(); // That's a cast.
    boolean yucksR = yuck.r; // Get the "r" variable from the object.

  • How can you get the update on an iPad 1

    I really want to get the update on my iPad 1 but I'm not sure how to do that help please?!

    A 1st generation iPad cannot be updated beyond iOS 5.1.1.

Maybe you are looking for

  • External business partner user creation notification

    Hi experts, We are in SRM 7.0. When creating user for Vendor/Bidder (Create contact person with reference) the system automatically sends two emails to the vendor. The first one with the User ID and Contact person and a second mail with the password.

  • Dropped connection on laptop

    Every other day this happens . I have router WRT54GX2. It connects directly to my desktop. My daughter has a HP laptop. Almost every other day she cannot access internet. It shows our network sometimes and sometimes it does not. It shows other networ

  • Error in the Data Selection - Errors in Source System RSM 340

    Hey Everyone, I'm having an issue with loading a Delta for 0MAT_PLANT_ATTR.  This is the second night it has happened, where I get the error "Error in the Data Selection".  This error happens in the EXTRACTION part of the Monitor.  And, we cannot run

  • Sequence passfail status

    The TS code I need to modify needs to have a subsequence and the subsequence will have about 5 or 6 verify steps. What is the standard method for rolling up the results of all these Verify statements to give an overall pass/fail value for the subSequ

  • Incomplete information in report listing of Business Partners and Items

    Hi Our Client requests for Standard reports on Business Partners and Inventory Item Masters records to include all availabe fields that was entered into the Master Profile. Kedalene Chong