comp.text.xml
[Top] [All Lists]

Can xml attributes contain an underscore?

Subject: Can xml attributes contain an underscore?
From: DC
Date: Wed, 23 Jul 2008 00:32:36 -0700 PDT
Newsgroups: comp.text.xml

I'm having some non-success trying to parse an xml file containing
underscores in the attributes, like so:

  <variables first_year="2000" lastyear="2006">
    <variable var_name="cost" axis_name="year" type="entity"/>
    <variable var_name="enrollment" axis_name="enroll" type="data"/>
    <variable var_name="time" axis_name="time" type="data"/>
  </variables>


The jquery call that I've used previously without success...something
like: alert ( $(this).attr("var_name"))...gives me a value of
undefined.

<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy