Re: Parsing non-standard XML

2006-05-08 Thread Andrew Spear
Great idea Mike! Turned out to be a pretty elegant solution. Here's what I did 
to make it work...

#myxml#")>





>According to XMLSpy, this is a well-formed document until you add
>multiple  nodes.
>

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239876
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Parsing non-standard XML

2006-05-08 Thread Dawson, Michael
According to XMLSpy, this is a well-formed document until you add
multiple  nodes.

So, when you read this file into a variable, you should be able to just
add a new top-level node that encompasses the multiple  nodes.
Then, you should be able to parse the XML file into an actual XML object
in ColdFusion.

That should make everything fine, from what I can tell.

Two hints:
1. Always use CFDUMP when in doubt.
2. Multiple tags, at the same level, such as , will result in
an array over which you can loop.  (Again, refer to CFDUMP to see the
structure.)

M!ke 

-Original Message-
From: Andrew Spear [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 08, 2006 8:43 PM
To: CF-Talk
Subject: Parsing non-standard XML

I'm trying to parse a file for a school district that is supposed to be
XML, but it's not well-formed.  Does anyone here have experience parsing
files like this?  The format is something like this:



 xxx 
 xxx 
  
  


 Chapter 34 Reading Quiz   5  
asdfasdf  
6,5,14,38,5,5,15,38,5   89.9   B+
12345  
7,5,14,47,6,5,15,40,5   98.6   A+
  

And there are muliple top-level  nodes in each file.

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239875
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54