473,788 Members | 2,837 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.EventArg s) 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(R esponse.Output)
xDoc.Load(Serve r.MapPath("KB_T est_WI1.xml"))
xTrans.Load(Ser ver.MapPath("KB _Test.xsl"))
xTrans.Transfor m(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 1893

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

Similar topics

3
3151
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 (which not suprisingly should generate HTML output, and it does) 3) And the "error_log" output from the "server error" I get when I run it by typing in: http://localhost/cgi-bin/index.py
5
2828
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 great, but when I add nested tabs there is a problem with the 'visibility' not being inherited and some parts stay visible in the sub-tabs. Sorry if this is unclear. Here's how I have it layed out: I have a <span> for each content section of...
3
2094
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 I'm hoping for a little help from you guys. I have a class that needs use of a bread-first search of a quareney tree. In this class I have a nested class that should be the implementation of a tree that contains two nested classes of its own....
6
2491
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 I've hit a snag. How do I resolve multiple external references? The transform method on a stylesheet only takes one resolver, not an array Stephen
0
1448
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., hoping using msxml4 would solve my nested element index error problem mentioned in recent posts. Any explanations welcome! thanks, Kathy
1
1393
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
2921
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 the file. Here is the code snippet: XPathDocument xdoc = new XPathDocument(fs); XPathNavigator nav = xdoc.CreateNavigator(); xslt.Transform(nav, null, strWriter, null);
3
1994
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
1875
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 box: (errored code) Select Case ComboBox2.text Case Is ="Execute Program" 'code to execute program here Case Is ="Other Command that executes code at a certain time" ' code below the same as above except that it works But not my first(this...
0
9656
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10366
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10175
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9969
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7518
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3675
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.