Parsing XML with VB.net.

Posted by SuperFurryToad on Stack Overflow See other posts from Stack Overflow or by SuperFurryToad
Published on 2010-04-02T22:31:22Z Indexed on 2010/04/02 23:03 UTC
Read the original article Hit count: 390

Filed under:
|

I'm trying to make sense of a big data dump of XML that I need to write to a database using some VB.net code. I'm looking for some help getting started with the parsing code, specifically how to access the attribute values.

                  <Product ID="523233" UserTypeID="Property" ParentID="523232">
                <Name>My Property Name</Name>                     
                <AssetCrossReference AssetID="173501" Type=" Non Print old">
                  </AssetCrossReference>
                  <AssetCrossReference AssetID="554740" Type=" Non Print old">
                  </AssetCrossReference>
                  <AssetCrossReference AssetID="566495" Type=" Non Print old">
                  </AssetCrossReference>
                  <AssetCrossReference AssetID="553014" Type="Non Print">
                  </AssetCrossReference>
                  <AssetCrossReference AssetID="553015" Type="Non Print">
                  </AssetCrossReference>
                  <AssetCrossReference AssetID="553016" Type="Non Print">
                  </AssetCrossReference>
                  <AssetCrossReference AssetID="553017" Type="Non Print">
                  </AssetCrossReference>
                  <AssetCrossReference AssetID="553018" Type="Non Print">
                  </AssetCrossReference>

                <Values>
                  <Value AttributeID="5115">Section of main pool</Value>
                  <Value AttributeID="5137">114 apartments, four floors, no lifts</Value>
                  <Value AttributeID="5170">Property location</Value>
                  <Value AttributeID="5164">2 key</Value>
                  <Value AttributeID="5134">A comfortable property, the apartment is set on a pine-covered hillside - a scenic and peaceful location.</Value>
                  <Value AttributeID="5200">YYY</Value>
                  <Value AttributeID="5148">facilities include X,Y,Z</Value>
                  <Value AttributeID="5067">Self Catering. </Value>
                  <Value AttributeID="5221">Frequent organised daytime activities</Value>
                </Values>
              </Product>
            </Product>

Thanks in advance for your help.

© Stack Overflow or respective owner

Related posts about Xml

Related posts about vb.net