If I have the following XML file:
<events startDate="2003-01-01" endDate="2004-12-31">
<event id="5" title="Test Event 5" description="every second tuesday"
startDate="2003-01-01" endDate="2003-12-31" allDay="1"
eventType="weekly">
<pattern sun="0" sat="0" fri="0" thu="0" wed="0" tue="1" mon="0" recur="2" />
</event>
</events>
The pattern node is considered a child of event, is that correct? So
the structure would be:
<events> - Root Element
<event> - Child of <events>
<pattern> - Child of <event>
I'm trying to display the info from the pattern element but not
receiving any data. I am trying to get at by doing:
<cffunction access="public" name="readXml" output="false" returntype="events">
<cffile action="">
file="C:\cfusionmx\wwwroot\calendar\SparkEventsCalendar_loadXml.xml"
variable="event">
<cfset variables.calEvents = XmlParse(event) />
<cfset variables.eventChild =
ArrayLen(variables.calEvents.events.event.XmlChildren) />
<cfreturn this />
</cffunction>
I would think that the length of the array in variables.eventChild
would be 1 but it's returning 0. What am I missing when trying to
access the pattern node?
Thanks,
Ben
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
- xml question Seamus Campbell
- RE: xml question Kola Oyedeji
- RE: xml question Seamus Campbell
- RE: xml question Kola Oyedeji
- XML Question Brad Roberts
- RE: XML Question Joe Eugene
- RE: XML Question Brad Roberts
- RE: XML Question Joe Eugene
- RE: XML Question Brad Roberts
- Re: XML Question Massimo, Tiziana e Federica
- Re: XML Question Ben Densmore
- Re: XML Question Nick de Voil
- RE: XML Question Ken Ferguson
- 6.1 and 2003 server standard - iis 6 Jeremy Bunton
- Re: 6.1 and 2003 server standard - ii... Howie Hamlin
- Re: 6.1 and 2003 server standard ... Jeremy Bunton
- Re: 6.1 and 2003 server standard - ii... Doug White
- Re: 6.1 and 2003 server standard ... Tony Weeg
- Re: 6.1 and 2003 server stand... Tony Weeg
- Re: 6.1 and 2003 server ... Tony Weeg
- Re: 6.1 and 2003 server ... Jeremy Bunton