Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-2378

Problem with XmlParser

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.5
    • 1.5.1
    • XML Processing
    • None
    • Windows XP

    Description

      Used XML FIle:
      ---------------------------------------------------------------
      <?xml version="1.0" encoding="utf-8"?>
      <root>
      <menu>
      <linkbar>
      <delimeter value="&nbsp;" />

      <!-- die Links werden in folgenden Template ausgegeben -->
      <template><![CDATA[<a class="msk-hdr2" href="<url/>" title="<title/>"><text/></a>]]></template>

      </linkbar>
      </menu>
      </root>

      ----------------------------------------------------------------
      Codesnippet
      (Testet in groovyconsole:

      def xmlConfig = new XmlParser().parse(new File("c:/temp/x.xml"))

      println xmlConfig.menu[0].linkbar[0].template[0].value[0]

      Anwnser:

      groovy> def xmlConfig = new XmlParser().parse(new File("c:/temp/x.xml"))
      groovy> println xmlConfig.menu[0].linkbar[0].template[0].value[0]

      null

      -------------------------------------------------------

      Changing to 1.1-beta3 its run fine.

      Attachments

        Activity

          People

            paulk Paul King
            wnagy Wilhelm Nagy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: