Hi,

Here is modified version, just the output part
<CFOUTPUT>
<p>The name of root element is : <b>#Node_Root.XmlName#</b></p>
<p>The total number of elements are : <b>#nNumElements#</b></p>
<p>The text within the element is : <b> #Node_Root.xmltext#</b></p>
<p>The text within the attribute is : <b>
#Node_Root.XMLAttributes["xmlns:r25"]#</b></p>
</CFOUTPUT>

You have to play with xml little bit then you get a feel of it. I always do
it and forget it after few days. ;-) . Happens with me all the time with
xml. :-)

Ajas.


On Tue, Jul 15, 2008 at 11:40 AM, Tepfer, Seth <[EMAIL PROTECTED]> wrote:

>  Thanks Ajas, with your code and some study on my part, it makes sense.
>
> I'm not able to get XMLAttributes to work. Using your example below, would
> I reference:
>
>
>
> #Node_Root.XMLAttributes# or  would I explicity note the attribute via:
> #Node_Root.xmln:r25#
>
>
>
> Thanks
>
> Seth Tepfer 770-784-8487 [EMAIL PROTECTED]
>
> Director of Administrative Computing, Oxford College
>
> Proud Pappa (again): Zyle Caspian, born Thursday, April 17, 2:38 pm. 8 lbs,
> 19.5 inches. Baby Pix at: http://www.flickr.com/photos/[EMAIL PROTECTED]/
>
>
>
> *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of *Ajas
> Mohammed
> *Sent:* Tuesday, July 15, 2008 10:22 AM
> *To:* [email protected]
> *Subject:* Re: [ACFUG Discuss] Assistance parsing XML file?
>
>
>
> If you want to get text NO as output, here is code that can do the trick.
>
> <cfxml variable="MyXmlCode">
>
>     <?xml version="1.0" encoding="UTF-8"?>
>     <r25:attribute_value 
> xmlns:r25="http://www.collegenet.com/r25";>No</r25:attribute_value>
>
>
> </cfxml>
>
> <!---1. Parse XML into an XML OBJECT --->
> <CFSET MyXml = XmlParse(MyXmlCode)>
>
> <!---2. Get the Root of the XML DOCUMENT which will help to find other
> elements--->
> <CFSET Node_Root = MyXml.XmlRoot>
>
> <!---3. How many elements are there in the root --->
> <CFSET nNumElements = ArrayLen(Node_Root.XmlChildren)>
>
>
> <CFOUTPUT>
> <p>The total number of elements are : <b>#nNumElements#</b></p>
> <p>The text within the element is : <b> #Node_Root.xmltext#</b></p>
> </CFOUTPUT>
>
> If there were any attributes involved, I would have used XMlAttributes,
> similarly XmlChildren if there were any child elements.
>
> Sorry if you were looking for something else.
>
> HTH,
>
> Ajas.
>
> On Tue, Jul 15, 2008 at 10:11 AM, <[EMAIL PROTECTED]>
> wrote:
>
> Return Receipt
>
>   Your       Re: [ACFUG Discuss] Assistance parsing XML file?
>   document:
>
>   was        [EMAIL PROTECTED]
>   received
>   by:
>
>   at:        07/15/2008 10:09:21 AM
>
>
>
>
>
>
>
>
> -------------------------------------------------------------
> To unsubscribe from this list, manage your profile @
> http://www.acfug.org?fa=login.edituserform
>
> For more info, see http://www.acfug.org/mailinglists
> Archive @ http://www.mail-archive.com/discussion%40acfug.org/
> List hosted by http://www.fusionlink.com
> -------------------------------------------------------------
>
>
>
>
>
> --
> <Ajas Mohammed />
> http://ajashadi.blogspot.com
> We cannot become what we need to be, remaining what we are.
> No matter what, find a way. Because thats what winners do.
> You can't improve what you don't measure.
> Quality is never an accident; it is always the result of high intention,
> sincere effort, intelligent direction and skillful execution; it represents
> the wise choice of many alternatives.
> -------------------------------------------------------------
> To unsubscribe from this list, manage your profile @
> http://www.acfug.org?fa=login.edituserform
>
> For more info, see http://www.acfug.org/mailinglists
> Archive @ http://www.mail-archive.com/discussion%40acfug.org/
> List hosted by FusionLink <http://www.fusionlink.com>
> -------------------------------------------------------------
>
> ------------------------------
> This e-mail message (including any attachments) is for the sole use of
> the intended recipient(s) and may contain confidential and privileged
> information. If the reader of this message is not the intended
> recipient, you are hereby notified that any dissemination, distribution
> or copying of this message (including any attachments) is strictly
> prohibited.
>
> If you have received this message in error, please contact
> the sender by reply e-mail message and destroy all copies of the
> original message (including attachments).
>
> -------------------------------------------------------------
> To unsubscribe from this list, manage your profile @
> http://www.acfug.org?fa=login.edituserform
>
> For more info, see http://www.acfug.org/mailinglists
> Archive @ http://www.mail-archive.com/discussion%40acfug.org/
> List hosted by FusionLink <http://www.fusionlink.com>
> -------------------------------------------------------------




-- 
<Ajas Mohammed />
http://ajashadi.blogspot.com
We cannot become what we need to be, remaining what we are.
No matter what, find a way. Because thats what winners do.
You can't improve what you don't measure.
Quality is never an accident; it is always the result of high intention,
sincere effort, intelligent direction and skillful execution; it represents
the wise choice of many alternatives.



-------------------------------------------------------------
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------

Reply via email to