Subject: Re: [xsl] Embedding XSL in JavaScript From: "Joe Fawcett" <joefawcett@xxxxxxxxxxx> Date: Sun, 16 Mar 2003 08:08:31 -0000 |
The latest Netscape/Mozilla browsers have built-in parsers. Joe ----- Original Message ----- From: "john liao" <jliao2k@xxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Saturday, March 15, 2003 11:01 PM Subject: RE: [xsl] Embedding XSL in JavaScript > Jeff, > > Can you give some good references (books, links) on > using xml in javascript? > > Is there any other way to parse XML files in > javascript without microsoft? > > Thanks > J.L. > > --- XSLList <xsllist@xxxxxxxxxxxxx> wrote: > > John, > > > > I've taken 5 and built a (cheesy) example to do what > > you're talking about. > > This example using selectSingleNode directly against > > the source without a > > stylesheet. > > > > http://home.earthlink.net/~xsllist/getcust.htm > > http://home.earthlink.net/~xsllist/customer.xml > > > > Use 'John Doe' as a search criteria as I haven't > > added case-insensitivity or > > error-handling. All disclaimers about quality of > > hastily-prepared examples > > apply! > > > > Jeff > > > > > > >Great Brian what I meant is I have the the > > following > > >javascript function and > > >I would like to perform Xpath functions such as > > sum() and > > >return a value > > >into say a field. So I wondered if it was possible > > to embed > > >XSL into the > > >code in some way? > > > > > >function Search() > > > { > > > try > > > { > > > > > > /**************************************************************** > > > This section is to input a value from > > Accno.value > > > search and then populate the fields > > > > > > *****************************************************************/ > > > var strSearchValue = Accno.value; > > > var strSearchXPath2 = > > "INVOICE/DETAILS[@ACCNO='" > > >+strSearchValue + > > >"']" > > > var y; > > > > > y=docInvoice.getElementsByTagName(strSearchXPath2); > > > //Assign values to fields > > > txtCustomer.value = > > y.item(0).getAttribute("CUSTOMER"); > > > txtAddress.value = > > y.item(0).getAttribute("ADDRESS"); > > > txtCity.value = > > y.item(0).getAttribute("City"); > > > txtState.value = > > y.item(0).getAttribute("STATE"); > > > txtZip.value = > > y.item(0).getAttribute("ZIP"); > > > } > > > catch (error) > > > { > > > alert("An error occured in the function Search() > > The error was:" + > > >error.description); > > > } > > >} > > > > > > XSL-List info and archive: > > http://www.mulberrytech.com/xsl/xsl-list > > > > > ===== > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Web Hosting - establish your business online > http://webhosting.yahoo.com > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Embedding XSL in JavaScri, john liao | Thread | RE: [xsl] Embedding XSL in JavaScri, Martinez, Brian |
[xsl] Dynamic double sorting questi, Fei Xie | Date | Re: [xsl] Large Document, Markus Spath |
Month |