Recents
Name Property (for XMLReader Data Type)Official Content

The Name property returns the tag name of the selected element.

Syntax

&DataType.Name

Type Returned

Character

Example

XML file

<?xml version="1.0" encoding="ISO-8859-1" ?>
<MEETING Date="08/28/12">
     <DATE>08/28/12</DATE>
     <!—Meeting description-->
     <MEMBERS>
          <MEMBER>Peter</MEMBER>
          <MEMBER>Laura</MEMBER>
          <MEMBER>John</MEMBER>
          <MEMBER>Diana</MEMBER>
     </MEMBERS>
</MEETING>

A possible process could be:

Event 'ReadXML'
    &xmlreader.Open('file.xml')
    &xmlreader.ReadType(1, 'MEMBERS')
    &xmlreader.read()
    do while &xmlreader.name <> 'MEMBERS'
       &character = &xmlreader.value + " - " + &character
       &xmlreader.read()
    enddo
    &xmlreader.close()
    msg(&xmlreader.ErrDescription)
EndEvent

Scope

Extended Data Types:   XMLReader
Languages: .NET, Java, Ruby (up to GeneXus X Evolution 3), Visual FoxPro (up to GeneXus X Evolution 3)


See Also

XmlReader Data Type



Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.