Re: Maybe it's a bug
- From: Lorry Astra <LorryAstra@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 21 Aug 2006 05:02:01 -0700
Thanks Bob, but i have something to say about my question.
First of all, i don't revise the xml structure by coding, the structure is
changed by XSL, it's the XSL sort result ( after calling
DOMDocument.transformNodeToObject function, the Dom structure has been
changed from "<z:row ... />" to "<z:row...></z:row>").
Secondly, i think if ADO.Recordset can not handle the second
structure("<z:row></z:row>") correctly, it should throw an exception when i
try to "Open" the DOM. And i can not understand i open the DOM correctly(ADO
don't tip me any error.), but i can not get the correct result.
In my opinion, it's not the fault of XSL, but ADO. And i have some
suggestions:
1. When XSL find the structure the DOM which will be sorted is the structure
can be converted to Recordset, XSL should obey some rules when it sort the
DOM, for example: it don't revise the "<z:row/>" structure. although the both
of the structures are right.
2.When ADO find the structure of a DOM can not be opened correctly.it should
give a warning to programmers in order to avoid some logical errors in our
programs.
Thanks .
Lorry
"Bob Barrows [MVP]" wrote:
Lorry Astra wrote:.
Thank u for your answer, Mark.
1.Although Recordset usually don't be used to parse xml, i think the
recordset should not to tell me the result is 1 . it should be 3.
You cannot alter the structure of the xml and expect ADO to handle the
result correctly.
2. The reason why i revise the structure is that: i wanna sort the
xml. And i used XSL to sort my XML. Before i sorted it, the style was
"<z:row .../>", but after i sorted it by using XSL, the style was
changed to "<z:row ....></z:row>"
Why aren't you using the recordset's Sort method?
3. And u know, i use the recordset to fill a grid. so if the
recordcount is 1 , the grid will show only 1 row instead of 3. it
should list 3 rows. that's correct.
Bottom line: you cannot alter the structure of the xml and expect ADO to
handle the result correctly.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
- Follow-Ups:
- Re: Maybe it's a bug
- From: Bob Barrows [MVP]
- Re: Maybe it's a bug
- References:
- Re: Maybe it's a bug
- From: Mark J. McGinty
- Re: Maybe it's a bug
- From: Bob Barrows [MVP]
- Re: Maybe it's a bug
- Prev by Date: Re: Maybe it's a bug
- Next by Date: Re: parsing xml
- Previous by thread: Re: Maybe it's a bug
- Next by thread: Re: Maybe it's a bug
- Index(es):
Relevant Pages
|
|