How to programmatically get available wifi networks without airport utility?
You could (mis)use awk to filter the result:

airport -s -x| awk '          { if (catch == 1) { print; catch=0 } }
                   /SSID_STR/ { catch=1 }'
&lt;string&gt;UPC Wi-Free&lt;/string&gt;
&lt;string&gt;UPCE191589&lt;/string&gt;
&lt;string&gt;The Cloud&lt;/string&gt;
&lt;string&gt;UPCE191589&lt;/string&gt;
&lt;string&gt;The Cloud&lt;/string&gt;


Not very nice, but does the job :-)

OTOH, a SSID can be anything, it doesn't even need to be printable (see Is there a standard that defines what is a valid SSID and password?). So any attempt to handle SSID in text-based utilities will likely fail sooner or later.