$xml=simplexml_load_file("natural_gas.xml") or die("Error: Cannot create object");

foreach($xml->state as $state) {
echo "State: " . $state->title . "<br>";
echo "Diesel Price: " . $state->d . "<br>";
echo "CNG Price: " . $state->cng . "<br>";
echo "LNG Price: " . $state->lng . "<br><br>";
}

Gas Pricing by State:

State: Alabama
Diesel Price: 3.632
CNG Price: 2.4
LNG Price: 3.24

State: Arizona
Diesel Price: 3.672
CNG Price: 2.6
LNG Price: 3.46

State: Alaska
Diesel Price: none
CNG Price: none
LNG Price: none

State: Arkansas
Diesel Price: 3.677
CNG Price: 1.5
LNG Price: 2.25

State: California
Diesel Price: 3.898
CNG Price: 2.3
LNG Price: 3.13

State: Colorado
Diesel Price: 3.69
CNG Price: 2.0
LNG Price: 2.8

State: Conneticut
Diesel Price: 4.088
CNG Price: 2.8
LNG Price: 3.68

State: Delaware
Diesel Price: 3.711
CNG Price: 2.9
LNG Price: 3.79

State: Florida
Diesel Price: 3.838
CNG Price: 2.2
LNG Price: 3.02

State: Georgia
Diesel Price: 3.713
CNG Price: 2.4
LNG Price: 3.24

State: Hawaii
Diesel Price: none
CNG Price: none
LNG Price: none

State: Iowa
Diesel Price: 3.685
CNG Price: 2
LNG Price: 2.8

State: Idaho
Diesel Price: 3.719
CNG Price: 2
LNG Price: 2.8

State: Illinois
Diesel Price: 3.771
CNG Price: 2.45
LNG Price: 3.295

State: Indiana
Diesel Price: 3.569
CNG Price: 2
LNG Price: 2.8

State: Kansas
Diesel Price: none
CNG Price: none
LNG Price: none

State: Kentucky
Diesel Price: 3.709
CNG Price: 2.6
LNG Price: 3.46

State: Louisiana
Diesel Price: 3.652
CNG Price: 1.8
LNG Price: 2.58

State: Massachusetts
Diesel Price: 3.849
CNG Price: 2.4
LNG Price: 3.24

State: Maryland
Diesel Price: 3.794
CNG Price: 2
LNG Price: 2.8

State: Maine
Diesel Price: 3.779
CNG Price: none
LNG Price: none

State: Michigan
Diesel Price: 3.749
CNG Price: 2.65
LNG Price: 3.515

State: Minnesota
Diesel Price: 3.776
CNG Price: 2.2
LNG Price: 3.02

State: Missouri
Diesel Price: 3.578
CNG Price: 1.8
LNG Price: 2.58

State: Mississippi
Diesel Price: 3.593
CNG Price: 2
LNG Price: 2.8

State: Montana
Diesel Price: 3.605
CNG Price: 1.9
LNG Price: 2.69

State: North Carolina
Diesel Price: 3.757
CNG Price: 2
LNG Price: 2.8

State: North Dakota
Diesel Price: 3.827
CNG Price: 2
LNG Price: 2.8

State: Nebraska
Diesel Price: 3.736
CNG Price: 1.9
LNG Price: 2.69

State: New Hampshire
Diesel Price: 3.789
CNG Price: 2.4
LNG Price: 3.24

State: New Jersey
Diesel Price: 3.682
CNG Price: 2
LNG Price: 2.8

State: New Mexico
Diesel Price: 3.693
CNG Price: 2.2
LNG Price: 3.02

State: Nevada
Diesel Price: 3.698
CNG Price: 2.5
LNG Price: 3.35

State: New York
Diesel Price: 4.006
CNG Price: 2.6
LNG Price: 3.46

State: Ohio
Diesel Price: 3.736
CNG Price: 1.9
LNG Price: 2.69

State: Oklahoma
Diesel Price: 3.623
CNG Price: 1.5
LNG Price: 2.25

State: Oregon
Diesel Price: 3.589
CNG Price: 1.4
LNG Price: 2.14

State: Pennsylvania
Diesel Price: 3.869
CNG Price: 2
LNG Price: 2.8

State: Rhode Island
Diesel Price: 4.099
CNG Price: 2.4
LNG Price: 3.24

State: South Carolina
Diesel Price: 3.564
CNG Price: 1.8
LNG Price: 2.58

State: South Dakota
Diesel Price: 3.704
CNG Price: none
LNG Price: none

State: Tennessee
Diesel Price: 3.611
CNG Price: 1.9
LNG Price: 2.69

State: Texas
Diesel Price: 3.669
CNG Price: 1.8
LNG Price: 2.58

State: Utah
Diesel Price: 3.697
CNG Price: 1.5
LNG Price: 2.25

State: Virginia
Diesel Price: 3.572
CNG Price: 1.4
LNG Price: 2.14

State: Vermont
Diesel Price: 3.868
CNG Price: 2.85
LNG Price: 3.735

State: Washington
Diesel Price: 4.024
CNG Price: 1.9
LNG Price: 2.69

State: Wisconsin
Diesel Price: 3.722
CNG Price: 2
LNG Price: 2.8

State: West Virginia
Diesel Price: 3.806
CNG Price: none
LNG Price: none

State: Wyoming
Diesel Price: 3.596
CNG Price: 1.5
LNG Price: 2.25