Skip to main content
1-Visitor
May 12, 2015
Question

Hi All,

  • May 12, 2015
  • 1 reply
  • 758 views

Subject - How to get a nodeValue using APP

Background- I am using ufe elements which contains DIVISION REFRENCE,now I want to fetch the value of this ufe elements which actually contains the value of division refrence.

//APP source edit

var currentNode = formatting.currentXMLNode;

application.alert(currentNode.nodeValue);

But it is throwing null value

    1 reply

    14-Alexandrite
    May 13, 2015

    Hi Romesh

    What exactly are you looking for?

    The documentation says this about the Node object:

    "The attributes nodeName , nodeValue and attributes are included as a mechanism to get at node information without casting down to the specific derived interface. In cases where there is no obvious mapping of these attributes for a specific nodeType (e.g., nodeValue for an Element or attributes for a Comment ), this returns null ."

    In your example, currentNode will be an Element, so you will probably need to find the appropriate child of currentNode and get the nodeValue of that.

    Hope this helps

    Simon