• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to check if is defined a XML element?

Guest
Nov 08, 2009 Nov 08, 2009

Copy link to clipboard

Copied

Hi,

I'm parsing some RSS feeds and I'm not able to check if some elements are defined or not.

In example, I receive this error:

Element CATEGORY.XMLTEXT is undefined in a Java object of type class coldfusion.xml.XmlNodeMap referenced as

when a category of the ITEM is not defined.


I tried to check if

isDefined(XMLContent.rss.channel.item[idx].category.xmlText)

or

ParameterExists(XMLContent.rss.channel.item[idx].category.xmlText)

without success.

What is the right method to check it?

TOPICS
Advanced techniques

Views

1.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 08, 2009 Nov 08, 2009

Copy link to clipboard

Copied

LATEST

Resolved with:

<cfif structKeyExists(XMLContent.rss.channel.item[idx],"category")>
  EXISTS

<cfelse>
DOES NOT EXISTS

</cfif>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation