EDN Admin
Well-known member
Hi all ,
I have a problem here ,our company gets data which has a format similar to XML but in these the attributes are not quotes as in this example .
<imp date=04192012 aff=ACAPT site=3 src=ACAPT ssi=0><br/>
<pgto>1017</pgto><br/>
<prod type=4 svc=10>102040_105</prod><br/>
<supp type=3>102040</supp><br/>
</imp><br/>
<sc date=04192012 time=150127 aff=ACAPT site=3 src=ACAPT ssi=0 type=29><br/>
<pgto>1017</pgto><br/>
<userid>74119983163470444433004</userid><br/>
<sid id=1249337887634704444330052 /><br/>
<ga type="pricerange Up to 0</ga><br/>
<ga type="baths All</ga><br/>
<ga type="state fl</ga><br/>
<ga type="region Southeastern Florida</ga><br/>
<ga type="area Northeast Dade County</ga><br/>
<ga type="community North Miami Beach</ga><br/>
<ga type="radius_search_status N</ga><br/>
<ga type="listingtype A</ga><br/>
<ga type="resultcount 5013</ga><br/>
</sc>
This is just a part of code which we receive. As you can see their is one part of data which is formatted correctly with quoted attributes i.e. <ga> and other attributes are not quotes .
My problem is how can i get this code into xml format so that i can parse data out of it ?
Do i use c# or VB to insert double quotes around attributes or any other option is available ?
Please help me on this .<br/>
View the full article
I have a problem here ,our company gets data which has a format similar to XML but in these the attributes are not quotes as in this example .
<imp date=04192012 aff=ACAPT site=3 src=ACAPT ssi=0><br/>
<pgto>1017</pgto><br/>
<prod type=4 svc=10>102040_105</prod><br/>
<supp type=3>102040</supp><br/>
</imp><br/>
<sc date=04192012 time=150127 aff=ACAPT site=3 src=ACAPT ssi=0 type=29><br/>
<pgto>1017</pgto><br/>
<userid>74119983163470444433004</userid><br/>
<sid id=1249337887634704444330052 /><br/>
<ga type="pricerange Up to 0</ga><br/>
<ga type="baths All</ga><br/>
<ga type="state fl</ga><br/>
<ga type="region Southeastern Florida</ga><br/>
<ga type="area Northeast Dade County</ga><br/>
<ga type="community North Miami Beach</ga><br/>
<ga type="radius_search_status N</ga><br/>
<ga type="listingtype A</ga><br/>
<ga type="resultcount 5013</ga><br/>
</sc>
This is just a part of code which we receive. As you can see their is one part of data which is formatted correctly with quoted attributes i.e. <ga> and other attributes are not quotes .
My problem is how can i get this code into xml format so that i can parse data out of it ?
Do i use c# or VB to insert double quotes around attributes or any other option is available ?
Please help me on this .<br/>
View the full article