Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 475807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T00:25:32+00:00 2026-05-13T00:25:32+00:00

I am not seeing what I am doing wrong. To see what was being

  • 0

I am not seeing what I am doing wrong. To see what was being done, I changed the constructor values to “TEST”, after the XML gets read in (I verified what the XML is), the class values are still stuck to “TEST”. Any more Ideas? I am doing this process already in another class that works fine, neither me nor some co-workers could find the difference.

XML:

<IntervalTranslatorScrubberSetting>
  <LINEINDICATOR_USAGE>USG</LINEINDICATOR_USAGE>
  <FILETYPE>867</FILETYPE>
  <ESIDUNS>8417397824</ESIDUNS>
</IntervalTranslatorScrubberSetting>

CLASS: (Tried without the XMLElement, and tried using XMLAttribute just to see, no change)

Imports System.Xml.Serialization

Namespace Workers.Scrubber
    <Serializable()> _
    Public Class IntervalTranslatorScrubberSetting

#Region "Private Variables"
        Private _ESIDuns As String
        Private _FileType As String
        Private _LineIndicator_Usage As String
#End Region

#Region "Constructors"
        Sub New()
            Me.ESIDuns = "TEST"
            Me.FileType = "TEST"
            Me.LineIndicator_Usage = "TEST"
        End Sub
#End Region

#Region "Serialization"
        Private _SerializMe As New XML(Of IntervalTranslatorScrubberSetting)

        Public Function Serialize(ByVal XMLObject As IntervalTranslatorScrubberSetting) As String
            Return _SerializMe.Serialize(XMLObject)
        End Function

        Public Function Deserialize(ByVal XML As String) As IntervalTranslatorScrubberSetting
            Return _SerializMe.Deserialize(XML)
        End Function
#End Region

#Region "Properties"
        <XmlElement()> _
        Public Property ESIDuns() As String
            Get
                Return _ESIDuns
            End Get
            Set(ByVal value As String)
                _ESIDuns = value
            End Set
        End Property

        <XmlElement()> _
        Public Property FileType() As String
            Get
                Return _FileType
            End Get
            Set(ByVal value As String)
                _FileType = value
            End Set
        End Property

        <XmlElement()> _
        Public Property LineIndicator_Usage() As String
            Get
                Return _LineIndicator_Usage
            End Get
            Set(ByVal value As String)
                _LineIndicator_Usage = value
            End Set
        End Property
#End Region
    End Class
End Namespace

XML Handling Class:

Imports System.IO
Imports System.Xml

Public Class XML(Of T)
    Private _serializer As New System.Xml.Serialization.XmlSerializer(GetType(T))

    Public Function Serialize(ByVal myobject As T) As String
        'serialise to a memory stream, then read into a string
        Try
            Dim result As String = Nothing
            If myobject IsNot Nothing Then
                Using ms As New MemoryStream
                    Using xtw As New XmlTextWriter(ms, System.Text.Encoding.UTF8)
                        xtw.Formatting = Formatting.Indented
                        _serializer.Serialize(xtw, myobject)
                        'rewind
                        ms.Seek(0, System.IO.SeekOrigin.Begin)
                        Using reader As New StreamReader(ms, Text.Encoding.UTF8)
                            result = reader.ReadToEnd()
                            xtw.Close()
                            reader.Close()
                        End Using
                    End Using
                End Using
            End If
            Return result

        Catch ex As Exception
            Throw
        End Try
    End Function

    Public Function Deserialize(ByVal xml As String) As T
        Try
            'default to no object
            If Not String.IsNullOrEmpty(xml) Then
                Using sr As New StringReader(xml)
                    Return CType(_serializer.Deserialize(sr), T)
                End Using
            Else
                Return Nothing
            End If

        Catch ex As Exception
            Throw
        End Try
    End Function
End Class
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T00:25:32+00:00Added an answer on May 13, 2026 at 12:25 am

    Okay using @maxc ‘s suggestion, I tried the serialization of the class, and saw nothing different except for the capitalization of my XML attributes vs. my properties. I did not think this stuff was case sensitive? But when I changed it so their cases matched, it works, even changed it back and forth to confirm.

    Weird?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There must be something obvious that I'm doing wrong, but I'm not seeing it.
I'm sure I am just doing something really dumb and not seeing it but
After looking at several questions/answers here, I'm not seeing what I think I need.
I've done some looking around, but I'm not seeing an obvious answer to my
I'm not sure what I'm doing wrong, but I've got a piece of code
I'm not sure what I am doing wrong. But the uploaded file and it's
I thought it might be something I was doing wrong, but I am not
I'm not seeing any real advantages, other than the fact that you have a
I'm not seeing the error and was hoping someone could figure it out: public
I'm not seeing a way to create, via the HtmlHelper , a SelectListItem that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.