473,406 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

ReadouterXML Issue

When I try to do the following in a vb.net application:


Expand|Select|Wrap|Line Numbers
  1. While xtr.Read() And recordCnt < loopCount
  2.  
  3.             If xtr.NodeType = XmlNodeType.Element Then
  4.                 If (xtr.Name = "Employee") Then
  5.                     recordCnt = recordCnt + 1
  6.                     strWriter = New StringWriter
  7.                     UID = ""
  8.                     strWriter.Write(xtr.ReadOuterXml)
  9.                     Dim xdoc As New XmlDocument
  10.                     'writeObj = CreateObject("MSXML2.DOMDocument")
  11.  
  12.  
  13.                     If docType = "devplan" Then
  14.                         xdoc.LoadXml("<?xml version=""1.0"" encoding=""utf-16"" ?><Batch><DevelopmentPlan>" & strWriter.ToString & "</DevelopmentPlan></Batch>")
  15.                     Else
  16.                         xdoc.LoadXml("<?xml version=""1.0"" encoding=""utf-16"" ?><Batch><TalentProfile>" & strWriter.ToString & "</TalentProfile></Batch>")
  17.                     End If
  18. End While
Every other record seems to get skipped when I try to use readouterxml within the while read() loop. Any ideas why this happening or what I can do to fix this issue?

Thanks.
May 17 '07 #1
1 1511
dorinbogdan
839 Expert 512MB
Welcome to TheScripts TSDN...

I will copy the thread to the .Net forum too.
May 18 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: George Hester | last post by:
Please take a look at this google artcle: http://groups.google.com/groups?hl=en&lr=&frame=right&th=55d6f4b50f5f9382&seekm=411f370d%241%40olaf.komtel.net#link9 The op was having trouble with...
2
by: Anthony Cuttitta Jr. | last post by:
We have an application that outputs several different graphs from data downloaded from our AS400. The application has worked without (this) issue for several months now, but just recently, the...
2
by: Ben Rush | last post by:
Hello World, Okay, I have spent the day browsing the newsgroups and reading up on article after article concerning ViewState corruption and so forth, and I have a couple questions. We...
0
by: Skunker | last post by:
hi, when I read a file, ReadOuterXml() returns sometimes an empty string and somestimes not. does anyone have a clue? here´s a part of the code, i hope i helps: // used to parse wordML Tables...
3
by: wijay2k | last post by:
i'm converting a C# program which parses a XML file into java. in c# the ReadOuterXml() method is used to pullout the whole content of a particular element tag. i need a similar kind of method or...
3
by: stvnegert | last post by:
When I try to do the following in a vb.net application: While xtr.Read() And recordCnt < loopCount If xtr.NodeType = XmlNodeType.Element Then If (xtr.Name = "Employee") Then recordCnt =...
2
by: stvnegert | last post by:
When I try to do the following in a vb.net application: While xtr.Read() And recordCnt < loopCount If xtr.NodeType = XmlNodeType.Element Then If (xtr.Name =...
1
by: dignan.tenenbaum | last post by:
Hello, I'm using the XmlReader.ReadOuterXml() method to return the string representation of an xml node. The XmlReader is created with a file path and a XmlReaderSettings object. This was...
13
by: SAL | last post by:
Hello, I'm trying to include a popup in the ItemTemplate of a gridview row. The ItemTemplate for the field contains a textbox and when the user clicks in the textbox I want a popup panel to show...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.