Hello everyone,
I am feeling very frustrated and overwhelmed with my current situation. I have been searching everywhere for a solution but seem to be going in circles.
This will be my first attempt at working with xml and it's quite daunting, especially since the file is rather large - around 5mb. I can't imagine loading such a big file into memory for processing, as it would likely irritate our users.
Essentially, we are relying on a third-party site for our ecommerce needs, so we only have access to the database through the admin area.
Our main goal is to ensure that there are no errors when it comes to addresses. That's why we put together an xml file listing all postcodes along with their corresponding areas and states:
<?xml version="1.0"?>
<POSTCODES>
<PostCode id="2035">
<Area>2035 1</Area>
<Area>2035 2</Area>
<Area>2035 3</Area>
<State>NSW</State>
</Postcode>
<PostCode id="2038">
<Area>2038 1</Area>
<Area>2038 2</Area>
<Area>2038 3</Area>
<State>NSW</State>
</Postcode>
<PostCode id="2111">
<Area>2111 1</Area>
<Area>2111 2</Area>
<Area>2111 3</Area>
<State>NSW</State>
</Postcode>
</POSTCODES>
Someone recommended using SAX, but unfortunately couldn't provide guidance on how to implement it. I've searched the internet extensively, but most examples either don't show how to read the file directly or are in Java.
What we need is simple: When a user enters a postcode like 2038, we want JavaScript to retrieve all suburbs within that postcode.
If anyone out there can point me in the right direction of what tools to download and how to use them, I would greatly appreciate it.
Please forgive my desperation, but I'm really struggling and could use some assistance.