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 http://www.fusionlink.com
-------------------------------------------------------------

Reply via email to