Skip to main content
July 17, 2010
Question

How get the untagged contents using JS?

  • July 17, 2010
  • 2 replies
  • 2090 views

Hi All,

Pl. give me the hint to get the untagged contents using JS?

Thanks in advance.

Praveen

This topic has been closed for replies.

2 replies

Loic.Aigon
Legend
June 6, 2012

Hi,

untagged content has null associatedXMLElement. Once that said, loop through all the contents and check the associatedXMLElement value.

Loic

http://www.loicaigon.com

Inspiring
June 7, 2012

The untagged content has not null associatedXMLElement because its getting root XMLElement in such case....so how to find untagged content?

Loic.Aigon
Legend
June 7, 2012

Hi,

I am surprised you get that result. If an item isn't tagged, there is no way you get returned the root xml element.

Given some content of an untagged text frame :

app.selection[0].associatedXMLElements //undefined

Unless teh content makes part of some tagged textframe, which may return the associatedXMLElements of the parent and even then, no content can be associated with the root as every tagged contents are children of the root. Do you have screenshot ?

Loic

Inspiring
June 6, 2012

Hi Praveen,

                   

                    Did you complete this? If yes pls give me the points...

                        Thanks in advance...