Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

XML/XSL transformation and DocumentFragment resultant parsing

 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello. Thank you for reading my question. I am returning XML from a Tomcat servlet and transforming with XSL. i am converting this from MSXML to XHR. For whatever reason, if I feed in the source XML, evaluate does it's thing. However, if I transform XML using the stylesheet and the resultant is a DocumentFragment (doc_trans...set to resultDoc, the JS code evaluates to the "else"...alert("no"). I want to use an evaluate on the resultant document to determine how the number of <tr>. selectNodes allows this in MSXML..

Maybe need to convert the DocumentFragment before running evaluate? But to what? Thank you so much.


 
Thomas Griffith
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
DocumentFragment shares most of the methods with NodeList, so methods like querySelector and querySelectorAll, firstChild etc with the resulting DocumentFragment.

I wanted to find the number of rows in the transformed document (A DocumentFragment) so used querySelector instead of evaluate...

 
reply
    Bookmark Topic Watch Topic
  • New Topic