473,396 Members | 2,038 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,396 software developers and data experts.

XML TRANSFORM - Serious problem - nested element causes Index error...why oh why???

Hi,

This problem is KILLING my project. I'm transforming an xml doc (step
by step instruction documents) in asp.net web form. I've tried using
the xml web control and the following code:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Response.Write("Hello Rod x 2")
Dim xDoc As New XmlDocument()
Dim xTrans As New XslTransform()
Dim xWriter = New XmlTextWriter(Response.Output)
xDoc.Load(Server.MapPath("KB_Test_WI1.xml"))
xTrans.Load(Server.MapPath("KB_Test.xsl"))
xTrans.Transform(xDoc, Nothing, xWriter)
End Sub

With both methods I get this error message:

Index was out of range. Must be non-negative and less than the size of
the collection. Parameter name: index

Both methods work on the EXACT same document IF I remove the third
nested level of the <step> element. xml sample structure is:

<step />
<step>
<step />
</step>
<step>
<step>
<step /> --here's where the error occurs!!!
</step>
</step>

PLEASE what am I missing? I thought one of the strengths of XML was to
be able to use this type of structure?

Thank you.

Kathy
Nov 17 '05 #1
0 1882

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: John Draper | last post by:
I am having a lot of problems trying to get a Python CGI to run. I have included 3 parts... 1) A simple stripped down python module. 2) An output of what I get when I do: python index.py...
5
by: horndude77 | last post by:
Ok, this might be for a web designing group, but here's my problem. I'm trying to make a web page with tabs which you can navigate between without the page reloading. I have one set of tabs working...
3
by: Chad E. Dollins | last post by:
Hello someone said that I should check this forum out for help to my c++ problems. I will admit at this point I may have really ran myself into the ground with this code that I am writing, but...
6
by: Stephen Cook | last post by:
Having worked through the problems around enabling the document function using an XmlUrlResolver I started work on building a useful class to hide the intricacies. Trying to generalise the process...
0
by: KathyB | last post by:
Hi, I've been reading conflicting posts, etc., could someone please explain to me if msxml is used by asp.net to transform xml using an xsl stylesheet? If msxml is NOT used, CAN it be...i.e.,...
1
by: Gi | last post by:
Hi, Can anyone tell me you can I transform this kind of XML: <Cont ID='faqs'> <Conts ID=''> <Elements> <Data></Data> <Pergunta></Pergunta> <Resposta></Resposta> </Elements>
12
by: das | last post by:
Hello all, I am using .NET XSLT to transform an XML into another XML file. All this is fine with small files, but when tested with big files (30MB) it is taking between 1hr-2hrs to just transform...
3
by: @CL | last post by:
Hi,all I was confused with xml transform. I had a xml file like: <Details> <names> <name/> <name/> ......or more <name/> </names>
6
by: =?Utf-8?B?amVmZmVyeQ==?= | last post by:
i need help with a combo box and this same code works on my first tab with a combo box. The error or problem i have is this code causes an index out of range error when i run it on my second combo...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.