<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Usingnamespace - Blog &#187; XML</title>
	<atom:link href="http://www.usingnamespace.org/category/xml/feed" rel="self" type="application/rss+xml" />
	<link>http://www.usingnamespace.org</link>
	<description>C#, XUL, Javascript, C++ ...</description>
	<lastBuildDate>Tue, 17 Jul 2012 14:53:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>[XUL] xml-combobox and xml-radiobox</title>
		<link>http://www.usingnamespace.org/xul-xml-combobox-and-xml-radiobox.html</link>
		<comments>http://www.usingnamespace.org/xul-xml-combobox-and-xml-radiobox.html#comments</comments>
		<pubDate>Wed, 17 Feb 2010 15:14:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[XBL]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XUL]]></category>

		<guid isPermaLink="false">http://www.usingnamespace.org/?p=36</guid>
		<description><![CDATA[I am pleased to share one creation of mine  .
The following widget is a XBL binding based on the XUL&#8217;s XNL templates technology.
https://developer.mozilla.org/en/XUL/Template_Guide/XML_Templates
If you need to display xml data into a xul menulist -combobox- or in a radiogroup -radiobox-, without having to implement an XML parser, here is the solution :
xml-combobox
xml-radiobox

&#60;xml-combobox id=&#34;myid&#34; datasources=&#34;chrome://application/pathtoxmlfile&#34; expr=&#34;&#34;/&#62;
&#60;xml-radiobox [...]]]></description>
			<content:encoded><![CDATA[<p>I am pleased to share one creation of mine <img src='http://www.usingnamespace.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>The following widget is a XBL binding based on the XUL&#8217;s XNL templates technology.<br />
<a href="https://developer.mozilla.org/en/XUL/Template_Guide/XML_Templates">https://developer.mozilla.org/en/XUL/Template_Guide/XML_Templates</a></p>
<p>If you need to display xml data into a xul menulist -combobox- or in a radiogroup -radiobox-, without having to implement an XML parser, here is the solution :</p>
<p><a href="http://www.usingnamespace.org/downloads/XUL/bindings/xml-combobox.xml">xml-combobox</a><br />
<a href="http://www.usingnamespace.org/downloads/XUL/bindings/xml-radiobox.xml">xml-radiobox</a></p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xml-combobox</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;myid&quot;</span> <span style="color: #000066;">datasources</span>=<span style="color: #ff0000;">&quot;chrome://application/pathtoxmlfile&quot;</span> <span style="color: #000066;">expr</span>=<span style="color: #ff0000;">&quot;&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xml-radiobox</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;myid&quot;</span> <span style="color: #000066;">datasources</span>=<span style="color: #ff0000;">&quot;chrome://application/pathtoxmlfile&quot;</span> <span style="color: #000066;">expr</span>=<span style="color: #ff0000;">&quot;&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

<p><strong>Attributes : </strong></p>
<p><u>datasources</u> : URL of an XML document, either a local file or a remote web site.</p>
<p><u>expr</u> : the <em>expr</em> attribute is a very simple XPath expression which simply retrieves the root elements of your query within the <em>datasource</em>.</p>
<p><u>label</u> : </p>
<ul>
<li>starting with &laquo;&nbsp;!&nbsp;&raquo; : an XPath expression corresponding to the node you want to use as a <em>label</em>.</li>
<li>starting with &laquo;&nbsp;?&nbsp;&raquo; : a property of the node corresponding to the expr result, you want to use as a <em>label</em>.</li>
<li>Otherwise just a text used as a <em>label</em> for all the generated lines (can be empty).</li>
</ul>
<p><br/><br />
<u>value</u> : </p>
<ul>
<li>starting with &laquo;&nbsp;!&nbsp;&raquo; : an XPath expression corresponding to the node you want to use as a <em>value</em>.</li>
<li>starting with &laquo;&nbsp;?&nbsp;&raquo; : a property of the node corresponding to the expr result, you want to use as a <em>value</em>.</li>
<li>Otherwise just a text used as a <em>value</em> for all the generated lines (can be empty).</li>
</ul>
<p><br/><br />
<u>image</u> : </p>
<ul>
<li>starting with &laquo;&nbsp;!&nbsp;&raquo; : an XPath expression corresponding to the node you want to use as an <em>image</em>.</li>
<li>starting with &laquo;&nbsp;?&nbsp;&raquo; : a property of the node corresponding to the expr result, you want to use as an <em>image</em>.</li>
<li>Otherwise just a text used as an <em>image</em> for all the generated lines (can be empty).</li>
</ul>
<p><br/><br />
<u>imageBaseFolder</u> : if the attribute <em>image</em> is used, the base folder where to look the images for. Useful if the image query result is just a file name, or a relative path. Must contain the final &laquo;&nbsp;/&nbsp;&raquo; or &laquo;&nbsp;\&nbsp;&raquo;. Can be left empty.</p>
<p><u>orient</u> : (xml-radiobox only) : &laquo;&nbsp;horizontal&nbsp;&raquo; or &laquo;&nbsp;vertical&nbsp;&raquo;.</p>
<p><u>onselect</u>: occurs when selection changed.</p>
<p><strong>Examples :</strong></p>
<p><u>Example 1 :</u> simple example using the properties of a XML node</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;people<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;person</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Napoleon Bonaparte&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;NB&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;person</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Cleopatra&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;Cl&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;person</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Julius Caesar&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;JC&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;person</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Ferdinand Magellan&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;FM&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;person</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Laura Secord&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;LS&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/people<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xml-combobox</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;myid&quot;</span> <span style="color: #000066;">datasources</span>=<span style="color: #ff0000;">&quot;chrome://application/pathtoxmlfile&quot;</span> <span style="color: #000066;">expr</span>=<span style="color: #ff0000;">&quot;person/&quot;</span> <span style="color: #000066;">label</span>=<span style="color: #ff0000;">&quot;?name&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;?id&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

<p><u>Example 2 :</u> using a node property for the id and a XPath from the targeted node for the label (here the text contained in the subnode &laquo;&nbsp;name&nbsp;&raquo;)</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;people<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;person</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;NB&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Napoleon Bonaparte<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;gender<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Male<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/gender<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/person<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;person</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;Cl&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Cleopatra<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;gender<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Female<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/gender<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/person<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;person</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;JC&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Julius Caesar<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;gender<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Male<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/gender<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/person<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;person</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;FM&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Ferdinand Magellan<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;gender<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Male<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/gender<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/person<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;person</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;LS&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Laura Secord<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;gender<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Female<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/gender<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/person<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/people<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xml-radiobox</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;myid&quot;</span> <span style="color: #000066;">datasources</span>=<span style="color: #ff0000;">&quot;chrome://application/pathtoxmlfile&quot;</span> <span style="color: #000066;">expr</span>=<span style="color: #ff0000;">&quot;person/&quot;</span> <span style="color: #000066;">label</span>=<span style="color: #ff0000;">&quot;!./name/text()&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;?id&quot;</span> <span style="color: #000066;">orient</span>=<span style="color: #ff0000;">&quot;horizontal&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

<p><u>Example 3 :</u> same as example 2 but with a xml-combobox and using the image property and imageBaseFolder to specify where the widget should look the images for</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;people<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;person</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;NB&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Napoleon Bonaparte<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;gender<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Male<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/gender<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;picture<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>nap.png<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/picture<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/person<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;person</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;Cl&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Cleopatra<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;gender<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Female<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/gender<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;picture<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>cleo.png<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/picture<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/person<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;person</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;JC&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Julius Caesar<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;gender<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Male<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/gender<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;picture<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>julius.png<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/picture<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/person<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;person</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;FM&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Ferdinand Magellan<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;gender<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Male<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/gender<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;picture<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>magellan.png<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/picture<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/person<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;person</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;LS&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Laura Secord<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;gender<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Female<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/gender<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;picture<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>secord.png<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/picture<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/person<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/people<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xml-combobox</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;myid&quot;</span> <span style="color: #000066;">datasources</span>=<span style="color: #ff0000;">&quot;chrome://application/pathtoxmlfile&quot;</span> <span style="color: #000066;">expr</span>=<span style="color: #ff0000;">&quot;person/&quot;</span> <span style="color: #000066;">label</span>=<span style="color: #ff0000;">&quot;!./name/text()&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;?id&quot;</span> <span style="color: #000066;">imageBaseFolder</span>=<span style="color: #ff0000;">&quot;chrome://application/skin/pic_small/&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;!./picture/text()&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

<p>And like all the XBL widgets, the bindings need to be done in a CSS :</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">xml-combobox<span style="color: #00AA00;">&#123;</span>
	-moz-binding<span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;chrome://application/content/bindings/xml-combobox.xml#xml-combobox&quot;</span><span style="color: #00AA00;">&#41;</span> !important<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
xml-radiobox<span style="color: #00AA00;">&#123;</span>
	-moz-binding<span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;chrome://application/content/bindings/xml-radiobox.xml#xml-radiobox&quot;</span><span style="color: #00AA00;">&#41;</span> !important<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.usingnamespace.org/xul-xml-combobox-and-xml-radiobox.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
