Click here to Skip to main content
15,897,891 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Using a usb barcode reader Pin
desanti21-Oct-16 7:23
desanti21-Oct-16 7:23 
GeneralRe: Using a usb barcode reader Pin
Dave Kreskowiak21-Oct-16 7:24
mveDave Kreskowiak21-Oct-16 7:24 
GeneralRe: Using a usb barcode reader Pin
desanti21-Oct-16 7:35
desanti21-Oct-16 7:35 
GeneralRe: Using a usb barcode reader Pin
Dave Kreskowiak21-Oct-16 7:56
mveDave Kreskowiak21-Oct-16 7:56 
GeneralRe: Using a usb barcode reader Pin
desanti21-Oct-16 8:14
desanti21-Oct-16 8:14 
GeneralRe: Using a usb barcode reader Pin
Dave Kreskowiak21-Oct-16 9:18
mveDave Kreskowiak21-Oct-16 9:18 
QuestionHow to generate XML file with serialisation in vb.net Pin
Member 1280320219-Oct-16 7:51
Member 1280320219-Oct-16 7:51 
AnswerRe: How to generate XML file with serialisation in vb.net Pin
jkirkerx19-Oct-16 9:13
professionaljkirkerx19-Oct-16 9:13 
One way is to create a strong typed class and just code to it. This method can create SOAP calls and WSDL files for transmitting or writing an API for. This is how I do it now.
<Serializable()>
Public Class ws_subscribersCount_Response

    Private m_response_Code As String
    Private m_response_Text As String
    Private m_count As Integer

    Public Property response_Code As String
        Get
            Return m_response_Code
        End Get
        Set(value As String)
            m_response_Code = value
        End Set

    End Property

    Public Property response_Text As String
        Get
            Return m_response_Text
        End Get
        Set(value As String)
            m_response_Text = value
        End Set

    End Property

    Public Property count As Integer
        Get
            Return m_count
        End Get
        Set(value As Integer)
            m_count = value
        End Set

    End Property

End Class
To populate the object, just create a new one and transmit it back to the caller, or send it to an endpoint.
Dim subscribers as New ws_subscribersCount_Response()

subscribers.response_Code = "OK"
subscribers.response_Text = m_count & " subscribers have loaded successfully"
subscribers.count = m_count   
Another way is to create a XSD file and use Xsd.Exe to convert it to a class and code against the class.
After the program creates a class file, you drop the class in your project. This is how I use to do it.

How to make an XSD file.
XML Schema Example[^]

After creating your XML class to to code against ...
You can read it from the disk drive
Create a new one and just transmit it
Write it to a disk drive.
Store it in a database
Dim writer As MemoryStream = Nothing

//Start of Quote Process 
Dim XMLRequest As UPSRequest.AccessRequest
XMLRequest = New UPSRequest.AccessRequest

XMLRequest.AccessLicenseNumber = sUPSsi.AccessLicenseNumber
XMLRequest.UserId = sUPSsi.UserID
XMLRequest.Password = sUPSsi.Password

//Now Lets Write out the file as a MemoryStream
Dim serializer As XmlSerializer
serializer = New XmlSerializer(GetType(UPSRequest.AccessRequest))

writer = New MemoryStream()
serializer.Serialize(writer, XMLRequest)
writer.Position = 0

//Now we have to write out a file for certification
Dim request_serializer As XmlSerializer = Nothing
request_serializer = New XmlSerializer(GetType(UPSRequest.AccessRequest))

If (True = p_Write_Certification_Request) Then

Using request_writer As New StreamWriter(HttpContext.Current.Server.MapPath("~\Logs\UPS\"AccessRequest.xml"))

   request_serializer.Serialize(request_writer, XMLRequest)

End Using

End If

Questionprogram application to connect HSAjet Mini Key ink jet printer Pin
Member 1119728817-Oct-16 15:07
Member 1119728817-Oct-16 15:07 
AnswerRe: program application to connect HSAjet Mini Key ink jet printer Pin
Richard MacCutchan18-Oct-16 5:05
mveRichard MacCutchan18-Oct-16 5:05 
GeneralRe: program application to connect HSAjet Mini Key ink jet printer Pin
Member 1119728818-Oct-16 21:43
Member 1119728818-Oct-16 21:43 
GeneralRe: program application to connect HSAjet Mini Key ink jet printer Pin
Richard MacCutchan18-Oct-16 23:38
mveRichard MacCutchan18-Oct-16 23:38 
QuestionA way to get Next node or previous node in a treeview according to its position on the tree Pin
desanti14-Oct-16 13:30
desanti14-Oct-16 13:30 
AnswerRe: A way to get Next node or previous node in a treeview according to its position on the tree Pin
Richard MacCutchan14-Oct-16 21:10
mveRichard MacCutchan14-Oct-16 21:10 
GeneralRe: A way to get Next node or previous node in a treeview according to its position on the tree Pin
desanti15-Oct-16 16:49
desanti15-Oct-16 16:49 
GeneralRe: A way to get Next node or previous node in a treeview according to its position on the tree Pin
Richard MacCutchan15-Oct-16 21:33
mveRichard MacCutchan15-Oct-16 21:33 
AnswerRe: A way to get Next node or previous node in a treeview according to its position on the tree Pin
Eddy Vluggen15-Oct-16 0:31
professionalEddy Vluggen15-Oct-16 0:31 
AnswerRe: A way to get Next node or previous node in a treeview according to its position on the tree Pin
Richard Deeming17-Oct-16 1:49
mveRichard Deeming17-Oct-16 1:49 
QuestionAccess and post data via Web Service using VB6 Pin
Member 127792476-Oct-16 0:34
Member 127792476-Oct-16 0:34 
AnswerRe: Access and post data via Web Service using VB6 Pin
Richard MacCutchan6-Oct-16 0:50
mveRichard MacCutchan6-Oct-16 0:50 
AnswerRe: Access and post data via Web Service using VB6 Pin
Dave Kreskowiak6-Oct-16 2:38
mveDave Kreskowiak6-Oct-16 2:38 
QuestionConnections with My SQL Pin
Hermawan265-Oct-16 23:31
Hermawan265-Oct-16 23:31 
SuggestionRe: Connections with My SQL Pin
Richard MacCutchan6-Oct-16 0:51
mveRichard MacCutchan6-Oct-16 0:51 
GeneralRe: Connections with My SQL Pin
Hermawan266-Oct-16 16:45
Hermawan266-Oct-16 16:45 
AnswerRe: Connections with My SQL Pin
Mycroft Holmes6-Oct-16 12:44
professionalMycroft Holmes6-Oct-16 12:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.