Help needed in swift language to convert below nsmutable string into nsdictionary.
Below format of NSDictionary data is required -
Code:
//-----------nsmutablestring:
<INFO>
<Store>
<StoreName>Colombian Jeans USA</StoreName>
<StoreCity>Tamarac</StoreCity>
<StoreAddress>4638 nw 58 CT</StoreAddress>
<StoreState>Florida</StoreState><
StoreTelephone>(786) 290-5724</StoreTelephone>
<StoreLocation>Tamarac</StoreLocation>
</Store>
<Store>
<StoreName>Bel Sanchez Photography Inc.</StoreName>
<StoreCity>Margate</StoreCity>
<StoreAddress>1799 North State Road 7</StoreAddress>
<StoreState>Florida</StoreState>
<StoreTelephone>(954) 856-1494</StoreTelephone>
<StoreLocation>Margate</StoreLocation>
</Store>
<Store>
<StoreName>Max Computer Doctor</StoreName>
<StoreCity>Tamarac</StoreCity>
<StoreAddress>5575 Florida 7</StoreAddress>
<StoreState>Florida</StoreState>
<StoreTelephone>(954) 399-4754</StoreTelephone>
<StoreLocation>Tamarac</StoreLocation>
</Store>
</INFO>
Below format of NSDictionary data is required -
Code:
{
Store = (
{
StoreAddress = “4638 nw 58 CT ";
StoreCity = Tamarac;
StoreLocation = Tamarac;
StoreName = "Colombian Jeans USA";
StoreState = Florida;
StoreTelephone = "(786) 290-5724";
},
{
StoreAddress = "7868 West Sample Road";
StoreCity = Margate;
StoreLocation = Margate;
StoreName = "J.R. Pizza Bella Restaurant";
StoreState = Florida;
StoreTelephone = "(954) 753-1300";
},
{
StoreAddress = "5575 Florida 7";
StoreCity = Tamarac;
StoreLocation = Tamarac;
StoreName = "Max Computer Doctor";
StoreState = Florida;
StoreTelephone = "(954) 399-4754";
},
);
"__name" = INFO;
}
Last edited by a moderator: