Matthew Woodward said the following on 09/28/2010 05:58 PM:
On Tue, Sep 28, 2010 at 2:59 PM, Peter J. Farrell <[email protected] <mailto:[email protected]>> wrote:

    Really?  I'm using FedEx on OpenBD and I don't have any problems
    -- although I'm pretty sure I'm not using namespaces.


Yep, the sample I got has <v9:Foo> type stuff all over the place, which I'm not terribly familiar with personally, but I'm looking into it.

Running on OpenBD 1.4 nightly:

<cfsavecontent variable="s">
<level1 xmlns:v9="http://example.com/dummy.cfm";>
<level2>
<Notifications>
<v9:Severity>SUCCESS</v9:Severity>
<Message>Transaction Complete</Message>
</Notifications>
</level2>
</level1>
</cfsavecontent>
<cfset xmlText = xmlParse(s)>

<cfset severity =
xmlText.level1.level2.Notifications["v9:Severity"].xmlText>

<cfdump var="#severity#">

I get the result of:

SUCCESS

Namespaces work just fine - you just have to use bracket notation because ":" isn't a value character when parsing CFML keys. The only caveat it that you have to make sure that that you have the namespace defined (even if it's to a dummy document because "" throws a SAX error).

.pjf

--
Open BlueDragon Public Mailing List
http://www.openbluedragon.org/   http://twitter.com/OpenBlueDragon
official manual: http://www.openbluedragon.org/manual/
Ready2Run CFML http://www.openbluedragon.org/openbdjam/

mailing list - http://groups.google.com/group/openbd?hl=en

Reply via email to