Login    
 
 
 
 
Text/HTML
  
You are here :: Blogs Saturday, May 19, 2012

Search
Note: This uses the internal blog search engine. The Google search engine is also available at the top of the page.
  
Disclaimer

Please review the site disclaimer before downloading or using content found on this site

  
Categories
  
DEVSHED Blog
As always, I welcome your comments!
Jun 17

Written by: Steve Gray
6/17/2010 1:04 PM  RssIcon

The task here is to use the SYSTEM.XML DOM and update a single node in a document. My document looks like this:

<eConnect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <POPReceivingsType>
    <taUpdateCreateVendorRcd>
    </taUpdateCreateVendorRcd>
    <taCreateVendorAddress>
    </taCreateVendorAddress>
    <taPopRcptLineInsert_Items>
      <taPopRcptLineInsert>
        <PONUMBER>PO08/00012</PONUMBER>
        <LOCNCODE>VA-PIEDMONTB</LOCNCODE>
      </taPopRcptLineInsert>
      <taPopRcptLineInsert>
        <PONUMBER>PO08/00012</PONUMBER>
        <LOCNCODE>VA-PIEDMONTA</LOCNCODE>
      </taPopRcptLineInsert>
    </taPopRcptLineInsert_Items>
    <taPopRcptHdrInsert>
      <POPRCTNM>RC08/00028</POPRCTNM>
      <POPTYPE>1</POPTYPE>
      <BACHNUMB>MYBATCH</BACHNUMB>
    </taPopRcptHdrInsert>
  </POPReceivingsType>
</eConnect>

 

Here is a sample of code that will do the deed.

Imports System.Xml
        Dim xmlDoc As New XmlDocument
        xmlDoc.Load(Application.StartupPath & "\xmlfile1.xml")
        Dim xnBatch As XmlNode = xmlDoc.SelectSingleNode("eConnect/POPReceivingsType/taPopRcptHdrInsert/BACHNUMB")
        xnBatch.InnerXml = "NewBatch"
        MsgBox(xmlDoc.InnerXml)

Tags:
Categories:
As always, I welcome your comments!
  
 
 
Home | Products | Blogs | Contact Us | Links | God's Plan
Privacy Statement | Terms Of Use
 
Copyright 2011 by Devshed.us