Skip navigation
Currently Being Moderated

Check is always false isXmlAttribute

May 21, 2012 2:12 AM

    Hi can anyone see why Check is always false isXmlAttribute in this case?

 

<cfset isNullCurrencyValue = true>
  <cfset CurrencyValue          = "">
 
<cfif isXmlAttribute(structFromParsedXML[d].XmlAttributes["CurrencyValue"]) >
  <cfset isNullCurrencyValue = false>
  <cfset CurrencyValue   = structFromParsedXML[d].XmlAttributes["CurrencyValue"]>
  </cfif>

 
Replies
  • Currently Being Moderated
    May 21, 2012 6:57 AM   in reply to nikos101

    Without seeing your XML... no, no-one will be able to see why.

     

    However the variable name sets off an alarm: "strucTFromParsedXML".  Sounds like a struct to me, not an XML object.

     

    --

    Adam

     
    |
    Mark as:
  • Currently Being Moderated
    May 26, 2012 12:34 AM   in reply to nikos101

    nikos101 wrote:

     

    <cfset structFromParsedXML = GetDataFromFeed(parsedXML)>

     

    Then it is actually an array. Hence:

     

    <cfset arrayFromParsedXML = GetDataFromFeed(parsedXML)>

     

     

    "ROOT/NewOrders"

    Remember that the search is case-sensitive. Therefore, use the exact case of the elements root and newOrders.

     
    |
    Mark as:
  • Currently Being Moderated
    May 29, 2012 2:07 PM   in reply to nikos101

    Look... we need to see:

    a) sample XML

    b) the code that creates structFromParsedXML

     

    Not an extract of the XML.  Not a description of how you get it.  The actual XML.

     

    And, similarly, the actual code that creates the variable.

     

    I expect to be able to copy and paste the XML and code you provide, and run it myself here.

     

    --

    Adam

     
    |
    Mark as:
  • Currently Being Moderated
    May 29, 2012 11:06 PM   in reply to Adam Cameron.

    Adam Cameron. wrote:

     

    Look... we need to see:

     

    b) the code that creates structFromParsedXML

    See above.

     
    |
    Mark as:
  • Currently Being Moderated
    May 30, 2012 8:24 AM   in reply to BKBK

    Yeah, OK, thanks for that. I don't mean a function that takes some unknown input and has a bunch of unnecessary code and then does an xmlSearch() and returns that.  I mean the end-to-end code starting with the XML and finishing with the problem.  A repro case, basically.

     

    --

    Adam

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points