G
gn
Due to the production servers being a multiple server farm and not
being able to write xml files to them, I am having to change my
application to write to HttpContext.Current.Application("var")
I have succeeding in doing this part, my problem is now how to read
them. I kinda hoped that I would be simply able to change
m_xmlr = New XmlTextReader(path/var.xml"))
to
m_xmlr = New
XmlTextReader(HttpContext.Current.Application("var").ToString)
here is my current code - what changes would I need to make?
m_xmlr = New XmlTextReader(path/var.xml"))
'Disable whitespace so that you don't have to read over
whitespaces
m_xmlr.WhitespaceHandling = WhitespaceHandling.None
'read the xml declaration and advance to family tag
m_xmlr.Read()
'Load the Loop
While Not m_xmlr.EOF
'Go to the name tag
m_xmlr.Read()
'if not start element exit while loop
If Not m_xmlr.IsStartElement() Then
Exit While
End If
m_xmlr.Read()
Dim C_TitleValue As String =
m_xmlr.ReadElementString("C_TITLE")
'Get the comment Element Value
Dim C_CommentValue As String =
m_xmlr.ReadElementString("C_COMMENT")
'Get the URL Element Value
Dim C_URLValue As String =
m_xmlr.ReadElementString("C_URL")
'Get the listorder Element Value
Dim C_ListorderValue As String =
m_xmlr.ReadElementString("C_LISTORDER")
'Iterate through writing values from XML file into the
table string
thanks so much, as always I am on a deadline
being able to write xml files to them, I am having to change my
application to write to HttpContext.Current.Application("var")
I have succeeding in doing this part, my problem is now how to read
them. I kinda hoped that I would be simply able to change
m_xmlr = New XmlTextReader(path/var.xml"))
to
m_xmlr = New
XmlTextReader(HttpContext.Current.Application("var").ToString)
here is my current code - what changes would I need to make?
m_xmlr = New XmlTextReader(path/var.xml"))
'Disable whitespace so that you don't have to read over
whitespaces
m_xmlr.WhitespaceHandling = WhitespaceHandling.None
'read the xml declaration and advance to family tag
m_xmlr.Read()
'Load the Loop
While Not m_xmlr.EOF
'Go to the name tag
m_xmlr.Read()
'if not start element exit while loop
If Not m_xmlr.IsStartElement() Then
Exit While
End If
m_xmlr.Read()
Dim C_TitleValue As String =
m_xmlr.ReadElementString("C_TITLE")
'Get the comment Element Value
Dim C_CommentValue As String =
m_xmlr.ReadElementString("C_COMMENT")
'Get the URL Element Value
Dim C_URLValue As String =
m_xmlr.ReadElementString("C_URL")
'Get the listorder Element Value
Dim C_ListorderValue As String =
m_xmlr.ReadElementString("C_LISTORDER")
'Iterate through writing values from XML file into the
table string
thanks so much, as always I am on a deadline