import {fetch} from 'wix-fetch'; function parseRetsXml(xml) { const parser = new DOMParser(); const xmlDoc = parser.parseFromString(xml, "text/xml"); const retsNode = xmlDoc.getElementsByTagName("RETS")[0]; const replyCode = retsNode.getAttribute("ReplyCode"); const replyText = retsNode.getAttribute("ReplyText"); const loginUrl = retsNode.getAttribute("Login"); const searchUrl = retsNode.getAttribute("Search"); return { replyCode, replyText, loginUrl, searchUrl }; } async function searchMLS(xml, query) { const retsInfo = parseRetsXml(xml); const response = await fetch(retsInfo.searchUrl, { method: 'post', headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, body: `search=${encodeURIComponent(query)}` }); const results = await response.json(); return results; } const xml = ' Broker = MemberName = 79190-RETSIDX James T Morrison MetadataVersion = 8.09.00001 MinMetadataVersion = 8.09.00001 User = 547029,NULL,NULL,NULL Login = http://rets.hawaiiinformation.com:6103/rets/login Logout = http://rets.hawaiiinformation.com:6103/rets/logout Search = http://rets.hawaiiinformation.com:6103/rets/search GetMetadata = http://rets.hawaiiinformation.com:6103/rets/getMetadata GetObject = http://rets.hawaiiinformation.com:6103/rets/getObject Balance = 0.01 TimeoutSeconds = 1800 '; const query = 'property type:Residential'; searchMLS(xml, query).then(results => { console.log(results); });
top of page
  • Writer's pictureJames T. Morrison R(S)

Kawaihae

Kawaihae is a charming coastal town located on the west coast of the Big Island of Hawaii. Known for its picturesque harbor, beautiful beaches, and rich cultural heritage, Kawaihae is a must-see destination for visitors to the island.


One of the main draws of Kawaihae is its picturesque harbor. The harbor is home to a variety of fishing boats and yachts, and it's a popular spot for fishing, boating, and watching the sunset. The harbor also offers a range of water activities, such as kayaking, paddleboarding, and snorkeling.


Kawaihae is also home to several beautiful beaches, including Mahaiula Beach, Spencer Beach Park, and Makolea Beach. These beaches offer great swimming, sunbathing, and snorkeling opportunities. Some of them are also popular spots for windsurfing and kitesurfing.


The town is also home to the Puukohola Heiau National Historic Site, which is a sacred Hawaiian temple that was built in the 18th century. The temple is an important historical and cultural site, and it's a great place to learn about the history and culture of Hawaii.

Kawaihae also offers a range of amenities, including a small grocery store, a post office, and a variety of restaurants and cafes. The town also has a small shopping center, which offers a range of shops and services. Additionally, the nearby towns of Waimea and Waikoloa offer a wider range of shops and services.


Overall, Kawaihae is a charming and picturesque town on the Big Island of Hawaii. With its beautiful beaches, rich cultural heritage, and range of amenities, it's a great destination for those looking to experience the natural beauty and culture of Hawaii. Whether you're looking for a relaxing vacation or an adventure-packed getaway, Kawaihae has something for everyone.

0 views0 comments

Recent Posts

See All
  • Facebook
  • Instagram
  • Yelp
bottom of page