No, the XML is fine (or, at the very least, the inconsistency won't
make it invalid).  How are you trying to loop if the name attribute is
causing problems?  What about just looping over the
dir_office_atm_locations nodes?

<cfset variables.locations = XMLSearch ( variables.parsedDoc,
'//dir_office_atm_locations' ) />
<cfdump var="#variables.locations#" />

On 8/22/06, Ray Champagne <[EMAIL PROTECTED]> wrote:
> I've been given an XML document that needs to be parsed into a query, and
> I'm having some issues I need help with.
>
>
>
> XML sample:
>
>
>
> <officelocations>
>
> <dir_office_atm_locations id="1" name="Headquarters" address="Ten Post
> Office Square" office="1" atm="1" link="http://www.mapquest.com"; sort="1"
> phone="(123) 123-1919" fax="(123)123-4550" city="Boston"
> state="Massachusetts" zip="02109"/>
>
> <dir_office_atm_locations id="2" address="Boylston Street" office="1"
> atm="1" link="http://www.mapquest.com"; sort="2" phone="(123)123-4500"
> fax="(123)123-4290" city="Boston" state="Massachusetts" zip="02116"/>
>
> </officelocations>
>
>
>
> Notice that the second node has "name" attribute.  That's what is giving me
> fits when looping over the XML.  Seems like no matter what I try, if that
> "name" attribute isn't defined, the loop will throw an error.  I have no
> control over the XML creation, or I'd just make name="" if there is no
> location and this would be done with.
>
>
>
> I'm not really an expert when it comes to XML, so any help with this is
> appreciated.  Is this considered to be an invalid XML document because of
> the inconsistency?
>
>
>
> Ray
>
>
>
>
>
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250582
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to