Ask a Question related to ASP.NET General, Design and Development.
-
KathyB #1
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
KathyB Guest
-
#39377 [NEW]: Transform element ( ) incorrectly
From: craig at skrabacz dot com Operating system: Windows XP PHP version: 4.4.4 PHP Bug Type: XSLT related Bug description: ... -
rotation error when using transform
hi all, when i use the transform.rotation to adjust the x and z axis data to 0, the y axiz data will get error(e,g, 76 degree) ..... because the... -
[HTML::Element] how to read element by element
Hello I read the doc about HTML::Element, but I don't find how to read the tree create by parse() element by element. The doc says the tree looks... -
Nested mySQL queries create issue with validity of result index?
Hi all, I am iterating through a result set to generate a second set of queries but no matter what I do I get the error Warning:... -
MVP? Index error on nested element using System.xml but NOT using msxml???
I would love to help you, but without seeing some code, I can't do anything. <frown> bill "KathyB" <KathyBurke40@attbi.com> wrote in message...



Reply With Quote

