Jump to content
Server Maintenance This Week. ×

Narrow XSLT Question regarding a Select statement


CCBtx

This topic is 4090 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I am importing XML data.

 

If I want to import the URL of the following XML:

 

<charts>

     <chart>

           <name>Median Condo Value</name>

           <url>http://www.zillow.com/app?chartType=affordability_avgCondoValue&graphType=barChart&regionId=11093&regionType=6&service=chart</url>

     </chart>

 

Then I use this select statement:  <COL><DATA><xsl:value-of select="//charts/chart[name='Median Condo Value']/url"/></DATA></COL>

 

Here is my question.  I want to import a Data element that has a "&" in the <name> field.  For example:

 

Normally for the XML below (and as with the example above) I would enter this select statement:

 

<COL><DATA><xsl:value-of select="//page[name='Homes & Real Estate']/tables/table/data/attribute/values/city/value"/></DATA></COL>

 

...but the "&" is causing the import to fail.

 

Does anyone have a suggestion?

 

<page>

   <name>Homes & Real Estate</name>

   <tables>

       <table>

           <name>Homes & Real Estate Data</name>

           <data>

               <attribute>

                   <name>Owners</name>

                   <values>

                       <city>

                           <value type="percent">0.52513637</value>

                       </city>

                   </values>

               </attribute>

           </data>

       </table>

   <tables>

</page>

Link to comment
Share on other sites

This topic is 4090 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.