IMporting the XML file using VB.Net

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
User avatar
bareedaa
Posts: 5
Joined: Mon May 20, 2013 12:55 pm

IMporting the XML file using VB.Net

Post by bareedaa » Sun Jun 09, 2013 1:56 am

I would like to import the following XML files using vb.net. Please help:::

Code: Select all

<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<REQUEST>
  <REQUESTID>384778</REQUESTID>
  <SUBJECT>ENCANA.PRD.PERSON_3.NEWHIRE</SUBJECT>
  <PERSON EMPLID="2013041">
    <NAME flag="A">
      <value>Test2013041, User2013041</value>
    </NAME>
    <FIRST_NAME flag="A">
      <value>User2013041</value>
    </FIRST_NAME>
    <MIDDLE_INITIAL flag="N">
      <value />
    </MIDDLE_INITIAL>
    <LAST_NAME flag="A">
      <value>Test2013041</value>
    </LAST_NAME>
    <GENERATIONAL_QUALIFIER flag="N">
      <value />
    </GENERATIONAL_QUALIFIER>
    <PREFERRED_FIRST_NAME flag="A">
      <value>User2013041</value>
    </PREFERRED_FIRST_NAME>
    <PREFERRED_FULL_NAME flag="A">
      <value>User2013041 </value>
    </PREFERRED_FULL_NAME>
    <JOBTITLE flag="A">
      <value>Student Land Administrator</value>
    </JOBTITLE>
    <USER_ID flag="A">
      <value>U2013041</value>
    </USER_ID>
    <EMAIL_ADDR flag="N">
      <value />
    </EMAIL_ADDR>
    <SEARCH_TYPE flag="A">
      <value>S</value>
    </SEARCH_TYPE>
    <SEARCH_TYPE_DESC>Contractor</SEARCH_TYPE_DESC>
    <PAY_STATUS flag="A">
      <value>0</value>
    </PAY_STATUS>
    <PAY_STATUS_DESC>Active</PAY_STATUS_DESC>
    <CONTINGENT_TYPE flag="A">
      <value>SS</value>
    </CONTINGENT_TYPE>
    <CONTINGENT_TYPE_DESC>Student</CONTINGENT_TYPE_DESC>
    <EMPL_STATUS flag="A">
      <value>S</value>
    </EMPL_STATUS>
    <EMPL_STATUS_DESC>Contractor Staff</EMPL_STATUS_DESC>
    <COMPANY flag="A">
      <value>00211</value>
    </COMPANY>
    <COMPANY_DESC>Cenovus Energy Inc (Upstream)</COMPANY_DESC>
    <LOCATION flag="A">
      <value>CGY</value>
    </LOCATION>
    <LOCATION_DESC>Calgary, AB, CA</LOCATION_DESC>
    <COST_CENTRE flag="A">
      <value>53896</value>
    </COST_CENTRE>
    <COST_CENTRE_DESC>CVE MINERAL LAND ASSET MGMT</COST_CENTRE_DESC>
    <DEPARTMENT>
      <DEPTID flag="A">
        <value>P44</value>
      </DEPTID>
      <DESCRIPTION>Mineral Land, SK</DESCRIPTION>
      <SHORT_DESCRIPTION />
      <STATUS>Y</STATUS>
    </DEPARTMENT>
    <BUSINESS_UNIT flag="A">
      <value>O86</value>
    </BUSINESS_UNIT>
    <BUSINESS_UNIT_DESC>Operations Shared Services</BUSINESS_UNIT_DESC>
    <DIVISION flag="A">
      <value>V02</value>
    </DIVISION>
    <DIVISION_DESC>Operations Support Teams</DIVISION_DESC>
    <COUNTRY flag="A">
      <value>CA</value>
    </COUNTRY>
    <COUNTRY_DESC>Canada</COUNTRY_DESC>
    <PANCAN_EMPLID flag="N">
      <value />
    </PANCAN_EMPLID>
    <STARTDATE flag="A">
      <value>04/22/2013 00:00:00.000000</value>
    </STARTDATE>
    <SUPERVISOR EMPLID="180960">
      <NAME flag="N">
        <value>Gundara, Gurdip K.</value>
      </NAME>
      <FIRST_NAME flag="N">
        <value>Gurdip</value>
      </FIRST_NAME>
      <MIDDLE_INITIAL flag="N">
        <value>K.</value>
      </MIDDLE_INITIAL>
      <LAST_NAME flag="N">
        <value>Gundara</value>
      </LAST_NAME>
      <GENERATIONAL_QUALIFIER flag="N">
        <value />
      </GENERATIONAL_QUALIFIER>
      <PREFERRED_FIRST_NAME flag="N">
        <value>Gurdip</value>
      </PREFERRED_FIRST_NAME>
      <PREFERRED_FULL_NAME flag="N">
        <value>Gurdip Gundara</value>
      </PREFERRED_FULL_NAME>
      <JOBTITLE flag="N">
        <value>Group Lead, Mineral Land SK</value>
      </JOBTITLE>
      <USER_ID flag="N">
        <value>GGUNDARA</value>
      </USER_ID>
      <EMAIL_ADDR flag="N">
        <value>Gurdip.Gundara@cenovus.com</value>
      </EMAIL_ADDR>
      <SEARCH_TYPE flag="N">
        <value>E</value>
      </SEARCH_TYPE>
      <PAY_STATUS flag="N">
        <value>0</value>
      </PAY_STATUS>
      <CONTINGENT_TYPE flag="N">
        <value />
      </CONTINGENT_TYPE>
      <EMPL_STATUS flag="N">
        <value>F</value>
      </EMPL_STATUS>
      <COMPANY flag="N">
        <value>00211</value>
      </COMPANY>
      <LOCATION flag="N">
        <value>CGY</value>
      </LOCATION>
      <COST_CENTRE flag="N">
        <value>53896</value>
      </COST_CENTRE>
      <DEPARTMENT>
        <DEPTID flag="N">
          <value>P44</value>
        </DEPTID>
        <DESCRIPTION>Mineral Land, SK</DESCRIPTION>
        <SHORT_DESCRIPTION />
        <STATUS>Y</STATUS>
      </DEPARTMENT>
      <BUSINESS_UNIT flag="N">
        <value>O86</value>
      </BUSINESS_UNIT>
      <DIVISION flag="N">
        <value>V02</value>
      </DIVISION>
      <COUNTRY flag="N">
        <value>CA</value>
      </COUNTRY>
      <PANCAN_EMPLID flag="N">
        <value />
      </PANCAN_EMPLID>
      <STARTDATE flag="N">
        <value>03/05/2012 00:00:00.000000</value>
      </STARTDATE>
    </SUPERVISOR>
    <PERSON_OFFICE LINE_NUMBER="" EMPLID="2013041">
      <OFFICE_NUMBER flag="">
        <value />
      </OFFICE_NUMBER>
      <OFFICE_TELEPHONE LINE_NUMBER="" EMPLID="2013041">
        <PHONE_TYPE />
        <AREA_CODE flag="">
          <value />
        </AREA_CODE>
        <PHONE_NUMBER flag="">
          <value />
        </PHONE_NUMBER>
      </OFFICE_TELEPHONE>
      <BUILDING>
        <BUILDINGID flag="">
          <value />
        </BUILDINGID>
        <BUILDING_NAME />
        <BUILDING_DESC />
      </BUILDING>
    </PERSON_OFFICE>
  </PERSON>
</REQUEST>

User avatar
Alexander Riedel
Posts: 6858
Joined: Tue May 29, 2007 4:43 pm

Re: IMporting the XML file using VB.Net

Post by Alexander Riedel » Sun Jun 09, 2013 3:16 am

Please understand that this is a VBScript forum, not a VB.Net forum. stackoverflow.com is probably a better place for your question.
Alexander Riedel
SAPIEN Technologies, Inc.

Locked