xmljs-users Mailing List for xml for SCRIPT (Page 5)
Brought to you by:
djoham,
witchhunter
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(8) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(11) |
Feb
(9) |
Mar
(20) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
(14) |
Aug
(14) |
Sep
(10) |
Oct
(5) |
Nov
(2) |
Dec
(11) |
2005 |
Jan
(12) |
Feb
(4) |
Mar
(3) |
Apr
(5) |
May
|
Jun
|
Jul
(2) |
Aug
(12) |
Sep
|
Oct
|
Nov
(1) |
Dec
(4) |
2006 |
Jan
(2) |
Feb
(2) |
Mar
(4) |
Apr
(2) |
May
|
Jun
(2) |
Jul
|
Aug
(5) |
Sep
|
Oct
|
Nov
|
Dec
(8) |
2007 |
Jan
|
Feb
(2) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(2) |
Sep
|
Oct
(8) |
Nov
|
Dec
(2) |
2008 |
Jan
(4) |
Feb
|
Mar
|
Apr
(5) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(3) |
2009 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
(1) |
Jul
(1) |
Aug
(4) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
2010 |
Jan
(6) |
Feb
(2) |
Mar
(4) |
Apr
(3) |
May
(2) |
Jun
(2) |
Jul
(5) |
Aug
(2) |
Sep
(1) |
Oct
(2) |
Nov
(1) |
Dec
(2) |
2011 |
Jan
(2) |
Feb
(1) |
Mar
(2) |
Apr
(2) |
May
(4) |
Jun
(4) |
Jul
(5) |
Aug
(5) |
Sep
(4) |
Oct
(3) |
Nov
(1) |
Dec
|
2012 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
(3) |
Nov
(1) |
Dec
|
2013 |
Jan
|
Feb
(3) |
Mar
(2) |
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(6) |
2014 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2016 |
Jan
|
Feb
|
Mar
(5) |
Apr
(3) |
May
(5) |
Jun
(8) |
Jul
(3) |
Aug
(14) |
Sep
(22) |
Oct
(9) |
Nov
|
Dec
(1) |
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Brent J. <blj...@gm...> - 2005-08-25 18:54:51
|
> > 1) I can't get it to parse Atom feeds. It just keeps returning a > > NAMESPACE_ERR. Anyone run into this and know how I can fix this, or a > > way to get around it? >=20 > I've never tried an Atom feed. Can you post as small an example as possib= le so we can take a look > at it? The example the user sent to me (I'm using xmljs for a Konfabulator widget) was a blog entry on blogspot.com: http://trishtunney.blogspot.com/atom.xml > > 2) Encoding! I'm trying to pull an RSS feed thats in french and the > > accented characters just keep coming back as garbled when I get the > > node value of the text node containing the french text. > > > Make sure the page's locale header specifies the proper encoding. Otherwi= se, the browser has to > guess what it should be and may very well guess wrong. Otherwise, it shou= ld work... Hmm, here's the example RSS feed that has french characters: http://www.lapresseaffaires.com/rss/lpa.xml Thanks, - Brent |
From: David J. <dj...@ya...> - 2005-08-25 16:33:39
|
Hi Barry, The problem is that the variable "addresses" is a DOMNodeList (returned from getChildNodes). A DOMNodeList doesn't support removeChild. Basically, you need to get yourself a reference back to the addresses node so you can call removeChild. Hope this helps! David --- Barry Beattie <ba...@ta...> wrote: > Hi all > > the error is "object doesn't support this property or method" > > but I'm trying to remove a node (and it's children) and just can't land it on the correct node. > Any idea what I'm doing wrong? I can see (alert) the correct node to remove but... (using W3C > DOM) > > thanx > barry.b > > code > =========== > function clearaddress(element_id){ > var ele = document.getElementById(element_id); > var clearAddrNum = ele.options[ele.selectedIndex].value; > var addressRoot = masterXmlDoc.getDocumentElement(); > var addresses = addressRoot.getElementsByTagName("addresses").item(0).getChildNodes(); > var addrBlock, address; > alert(masterXmlDoc); > for(var i=0;i<addresses.length;i++){ > if(addresses.item(i).getAttribute("add_num")==clearAddrNum){ > address = addresses.item(i); > alert(address) > addresses.removeChild(address); > break; > }//if > }//for > } > > XML schema(eg: want to remove address where add_num="2") > ======================================================== > <?xml version="1.0" encoding="UTF-8" ?> > <entity> > <addresses> > <address add_num="1"> > <address_name1 required="true"> > <![CDATA[ Gomez Addams ]]> > </address_name1> > </address> > <address add_num="2"> > <address_name1 required="true"> > <![CDATA[ Fester Addams ]]> > </address_name1> > </address> > </addresses> > </entity> > > > > > cheers > barry.b > > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > xmljs-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmljs-users > |
From: David J. <dj...@ya...> - 2005-08-25 16:17:57
|
Hi Brent! > 1) I can't get it to parse Atom feeds. It just keeps returning a > NAMESPACE_ERR. Anyone run into this and know how I can fix this, or a > way to get around it? I've never tried an Atom feed. Can you post as small an example as possible so we can take a look at it? > > 2) Encoding! I'm trying to pull an RSS feed thats in french and the > accented characters just keep coming back as garbled when I get the > node value of the text node containing the french text. > Make sure the page's locale header specifies the proper encoding. Otherwise, the browser has to guess what it should be and may very well guess wrong. Otherwise, it should work... Best regards, David |
From: Barry B. <ba...@ta...> - 2005-08-24 06:04:43
|
Hi all the error is "object doesn't support this property or method" but I'm trying to remove a node (and it's children) and just can't land = it on the correct node. Any idea what I'm doing wrong? I can see (alert) = the correct node to remove but... (using W3C DOM) thanx barry.b code =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D function clearaddress(element_id){ var ele =3D document.getElementById(element_id); var clearAddrNum =3D ele.options[ele.selectedIndex].value; var addressRoot =3D masterXmlDoc.getDocumentElement();=20 var addresses =3D = addressRoot.getElementsByTagName("addresses").item(0).getChildNodes(); var addrBlock, address; alert(masterXmlDoc);=20 for(var i=3D0;i<addresses.length;i++){ if(addresses.item(i).getAttribute("add_num")=3D=3DclearAddrNum){ address =3D addresses.item(i); alert(address) addresses.removeChild(address); break; }//if=09 }//for }=09 XML schema(eg: want to remove address where add_num=3D"2") =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D <?xml version=3D"1.0" encoding=3D"UTF-8" ?>=20 <entity> <addresses> <address add_num=3D"1"> <address_name1 required=3D"true"> <![CDATA[ Gomez Addams ]]> </address_name1> </address> <address add_num=3D"2"> <address_name1 required=3D"true"> <![CDATA[ Fester Addams ]]> </address_name1> </address> </addresses> </entity> cheers barry.b |
From: Brent J. <blj...@gm...> - 2005-08-23 23:54:20
|
First off, I just started using xmljs and its great. I'm using the W3CDOM version and I've run into a couple problems. 1) I can't get it to parse Atom feeds. It just keeps returning a NAMESPACE_ERR. Anyone run into this and know how I can fix this, or a way to get around it? 2) Encoding! I'm trying to pull an RSS feed thats in french and the accented characters just keep coming back as garbled when I get the node value of the text node containing the french text. Thanks, - Brent |
From: James S. E. <jam...@co...> - 2005-08-06 17:07:13
|
James, Try something like this: rows = doc.getElementsByTagName('row'); for (i=0;i<rows.length;i++) { cells = row.childNodes.items(i).getElementsByTagName('cell'); for (j=0;j<cells.length;j++) { val = cells.items(j).value; // do something with the value here } } That's just the basic algorithm off the top of my head. You will probably have to get the content of the first node of each cell element, which will be a textNode, and convert it to a JavaScript type. Perhaps someone else here could expound on that. -- James >> >>How can I iterate through the XML, reading each row, and then each cell? I >>started off by searching for a command along the lines of >>getNextNode/getNextChildNode, etc., but I am stumped on how to do this. All >>the examples seem to point to specific (known) nodes, and unique nodes at >>that. >> |
From: David J. <dj...@ya...> - 2005-08-05 16:52:29
|
Depending on what you're trying to do, the SAX parser might suite your needs very well. If you need to use the DOM, take a look at the DOMNode documentation for getNextSibling and getPreviousSibling. Those will probably get you what you're looking for. At the very least, you can always count the child nodes and do a manual loop... HTH David --- James Watson <swi...@ho...> wrote: > I could not find an answer in the archives ... I would think (hope) there is > a simple solution. > > I have a dynamically generated XML document that containts a data grid. It > looks like this: > > ... > <datarow> > <data>45.567</data> > <data>33.552</data> > </datarow> > <datarow> > <data>67.132</data> > <data>45.297</data> > </datarow> > ... > > How can I iterate through the XML, reading each row, and then each cell? I > started off by searching for a command along the lines of > getNextNode/getNextChildNode, etc., but I am stumped on how to do this. All > the examples seem to point to specific (known) nodes, and unique nodes at > that. > > Any help is appreciated. > > > -J > > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > xmljs-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmljs-users > |
From: James W. <swi...@ho...> - 2005-08-05 16:36:46
|
I could not find an answer in the archives ... I would think (hope) there is a simple solution. I have a dynamically generated XML document that containts a data grid. It looks like this: ... <datarow> <data>45.567</data> <data>33.552</data> </datarow> <datarow> <data>67.132</data> <data>45.297</data> </datarow> ... How can I iterate through the XML, reading each row, and then each cell? I started off by searching for a command along the lines of getNextNode/getNextChildNode, etc., but I am stumped on how to do this. All the examples seem to point to specific (known) nodes, and unique nodes at that. Any help is appreciated. -J |
From: Sean S. <si...@gm...> - 2005-07-30 21:46:12
|
I don't think it's possible to do what you want without some kind of change to the server. You want to save data to the server, so you have to change the server to be able to handle saving said data. I recommend using SQLite, and just a simple one table database. The .db file can be placed basically anywhere on the server's filesystem (as long as the web server process has write access to it and its directory). Then use PHP (or whichever language you prefer) to receive commands from the web page and communicate with the database. You could use XML for SCRIPT to read the data (I wouldn't), but you'd have to write your own Javascript functions to save it back to the database (at least that was true the last time I used XML for SCRIPT). I wrote a commercial application that had to read, parse, alter, and save XML data just a short while ago. Naturally, I can't reveal that code, but I've also written another non-commercial application that demonstrates what you have to do with SQLite, PHP, and Javascript to read and save data (however, it uses JSON instead of XML). Here's a link to a page demonstrating this stuff: http://seancode.blogspot.com/2005/07/graffiti.html The difference between JSON and XML in this case is that with JSON, the parsing and stringifying is done for you, so your code is a lot smaller. With XML, I had to write my own XML parsing functions using the DOM. This was the final reason I had to drop XML for SCRIPT for my application: I needed it to work cross-browser, and its XML parsing doesn't work on Safari or Konqueror. But using the DOM's getElementsByName functions work on all KJS, Gecko, and IE browsers. Also, in your PHP, when you're returning the XML to the browser, be sure to set the content type to text/xml (I think that's right) and use req.responseXML instead of req.responseText. The former gets you a DOM object that you can parse. The latter just gives you a string that you can't use any DOM functions on. I hope this helps a little. SEAN On 7/30/05, Ciprian Constantinescu <c.c...@gm...> wrote: > I need a catalog that is generated from a database in xml format. This > catalog is to be taken as xml from resellers and displayed on their page > with the posibility to navigate. The reseler takes only part of the catal= og, > that's why i need to keep the xml (genereted dinamic) on my server. Is th= ere > any method to cache the xml on the reseller server? > The problem is that i need a method which does not require the change of > configuration on the server of the reseller. Taking into account that i h= ave > about 300 resellers, each of them with about 2000-3000 visits/day, there > would be a very high amount of traffic on my server. Do you advise me to = use > XML for SCRIPT or to search another way of doing this? >=20 > --=20 > Ciprian Constantinescu > mobile: +40745192289 > e-mail: c_c...@ya... > e-mail: c.c...@gm...=20 > yahoo messenger: c_c...@ya... > msn messenger: c_c...@ya... |
From: Ciprian C. <c.c...@gm...> - 2005-07-30 21:14:41
|
I need a catalog that is generated from a database in xml format. This=20 catalog is to be taken as xml from resellers and displayed on their page=20 with the posibility to navigate. The reseler takes only part of the catalog= ,=20 that's why i need to keep the xml (genereted dinamic) on my server. Is ther= e=20 any method to cache the xml on the reseller server? The problem is that i need a method which does not require the change of=20 configuration on the server of the reseller. Taking into account that i hav= e=20 about 300 resellers, each of them with about 2000-3000 visits/day, there=20 would be a very high amount of traffic on my server. Do you advise me to us= e=20 XML for SCRIPT or to search another way of doing this? --=20 Ciprian Constantinescu mobile: +40745192289 e-mail: c_c...@ya... e-mail: c.c...@gm...=20 yahoo messenger: c_c...@ya... msn messenger: c_c...@ya... |
From: Larry S. <ls...@gm...> - 2005-04-25 21:02:51
|
Hello. I am trying to get help for using xmljs. I wrote a jsUnit test that calls "new DOMImplementation()". However, Firefox 1.0 throws "[Exception... "Object cannot be created in this context"=20 code: "9" nsresult: "0x80530009 (NS_ERROR_DOM_NOT_SUPPORTED_ERR)"=20 location: ""]". I ran the sample app for xpath in Firefox, and it works fine. I made sure that the HTML is including xmlsax.js, xmlw3cdom.js and xmlxpath.js. I would appreciate any help you might be able to offer. Thank you. --=20 Larry Siden http://umich.edu/~lsiden/ |
From: David J. <dj...@ya...> - 2005-04-15 14:57:01
|
<< so while "preserveWhiteSpace=false" will handle "[ fred ]", the extra tabs are all converted to their own type3 node, yes? >> Yup, that's probably the deal. I might even call that a bug, but I'd have to see how other parsers handle that before addmitting a mea culpa :) David --- Barry Beattie <Ba...@al...> wrote: > > thanx for your help, David. > > >> It should be off by default though > > aye, it is and explicitly setting it to "false" didn't quite fix it. > > but you *were* on the right track David, there *was* whitespace _between_ the nodes themselves - > usually TAB's. > > <f_name> <![CDATA[ fred ]]> </f_name> > ________^tab^_________________^tab^____________ > > so while "preserveWhiteSpace=false" will handle "[ fred ]", the extra tabs are all converted to > their own type3 node, yes? > > thanx > barry.b > > PS: > I've kicked the butt of the guy who wrote the server-side XML. I usually just get a URL (with > params) and that displays the xml doc in IE as my API (for XmlHttpRequest) > > ...and of course the whitespace doesn't show up in the browser directly...D'oh! > > > > > > > > > You"re probably seeing the white space in your XML turned into XML nodes. In XML, > whitespace is > non-trivial and can be included as part of the document as its own node. > > XML for <SCRIPT> provides a way to turn this feature off in the DOMImplementation object. > See > > > http://xmljs.sourceforge.net/website/documentation-w3cdom-DOMImplementation.html#DOMImplementationpreserveWhiteSpace > > for more info. It should be off by default though. Are you turning it on for some reason? > > David > > > > > -----Original Message----- > > From: xml...@li... > > [mailto:xml...@li...]On Behalf Of Barry > > Beattie > > Sent: Wednesday, 13 April 2005 1:31 PM > > To: XmlForJS (E-mail) > > Subject: [xmljs-users] ELEMENT_NODE Vs TEXT_NODE > > > > > > (this list has been so quiet that I'm wondering if I'm still > > subscribed...) > > > > hi all > > > > I'm really stumped on this (partly because I'm trying to > > muddle through this while being unwell) > > > > I've got a bunch of child nodes that are returning > > alternating (and phantom) types (xml below). I've had to > > filter out the "phantoms" with > > > > if(thisPeriod.nodeType == 1) > > > > Tracing the nodeType and length of childNodes I get 15 child > > nodes and their types are > > > > 3,1,3,1,3,1,3,1,3,1,3,1,3,1,3. > > > > I should only have 7 childNodes (7 "periods"). Where have the > > 8 text nodes come from? > > > > thanx > > barry.b > > > > > > periods = > > timetableRoot.getElementsByTagName("periods").item(0).getChildNodes(); > > for(var i=0;i<periods.length;i++){ > > var thisPeriod = periods.item(i) // each child node > > > > if(thisPeriod.nodeType == 1){// "1" = > > DOMNode.ELEMENT_NODE; "3" = DOMNode.TEXT_NODE > > .... process ... > > > > - <periods> > > + <period currentperiod="NO"> > > + <period currentperiod="NO"> > > + <period currentperiod="NO"> > > + <period currentperiod="NO"> > > + <period currentperiod="NO"> > > + <period currentperiod="NO"> > > + <period currentperiod="NO"> > > + <periods> > > > > > > and each <period> has this layout (note: there are 0 to many subjects) > > > > > > <period currentperiod="NO"> > > <day_code><![CDATA[ 2 ]]></day_code> > > <prd_code><![CDATA[ 1 ]]></prd_code> > > <prd_desc><![CDATA[ Period 1 ]]></prd_desc> > > <prd_end><![CDATA[ {ts '1970-01-01 09:39:00'} ]]></prd_end> > > <prd_start><![CDATA[ {ts '1970-01-01 09:00:00'} ]]></prd_start> > > <prd_weight /> > > <tt_id><![CDATA[ 26 ]]></tt_id> > > <subjects> > > <subject sub_code="0031"> > > <sub_code><![CDATA[ 0031 ]]></sub_code> > > <shortdescription><![CDATA[ Mat1 > > ]]></shortdescription> > > <class><![CDATA[ A ]]></class> > > <room><![CDATA[ B3 ]]></room> > > <sub_desc><![CDATA[ Mathematics I > > ]]></sub_desc> > > <tch_code><![CDATA[ LD ]]></tch_code> > > <tch_name><![CDATA[ Miss L Dent ]]></tch_name> > > </subject> > > </subjects> > > </period> > > > > > > ------------------------------------------------------- > > SF email is sponsored by - The IT Product Guide > > Read honest & candid reviews on hundreds of IT Products from > > real users. > > Discover which products truly live up to the hype. Start reading now. > > http://ads.osdn.com/?ad_ide95&alloc_id396&op=ick > > _______________________________________________ > > xmljs-users mailing list > > xml...@li... > > https://lists.sourceforge.net/lists/listinfo/xmljs-users > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_ide95&alloc_id396&op=click > _______________________________________________ > xmljs-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmljs-users > |
From: Barry B. <Ba...@al...> - 2005-04-15 05:02:16
|
thanx for your help, David. >> It should be off by default though aye, it is and explicitly setting it to "false" didn't quite fix it.=20 but you *were* on the right track David, there *was* whitespace = _between_ the nodes themselves - usually TAB's. <f_name> <![CDATA[ fred ]]> </f_name> ________^tab^_________________^tab^____________ so while "preserveWhiteSpace=3Dfalse" will handle "[ fred ]", the extra = tabs are all converted to their own type3 node, yes? thanx barry.b PS:=20 I've kicked the butt of the guy who wrote the server-side XML. I usually = just get a URL (with params) and that displays the xml doc in IE as my = API (for XmlHttpRequest) ...and of course the whitespace doesn't show up in the browser = directly...D'oh! You"re probably seeing the white space in your XML turned into XML = nodes. In XML, whitespace is non-trivial and can be included as part of the document as its own = node. =20 XML for <SCRIPT> provides a way to turn this feature off in the = DOMImplementation object. See =20 http://xmljs.sourceforge.net/website/documentation-w3cdom-DOMImplementati= on.html#DOMImplementationpreserveWhiteSpace =20 for more info. It should be off by default though. Are you turning it = on for some reason? =20 David > -----Original Message----- > From: xml...@li... > [mailto:xml...@li...]On Behalf Of Barry > Beattie > Sent: Wednesday, 13 April 2005 1:31 PM > To: XmlForJS (E-mail) > Subject: [xmljs-users] ELEMENT_NODE Vs TEXT_NODE >=20 >=20 > (this list has been so quiet that I'm wondering if I'm still=20 > subscribed...) >=20 > hi all >=20 > I'm really stumped on this (partly because I'm trying to=20 > muddle through this while being unwell) >=20 > I've got a bunch of child nodes that are returning=20 > alternating (and phantom) types (xml below). I've had to=20 > filter out the "phantoms" with=20 >=20 > if(thisPeriod.nodeType =3D=3D 1) >=20 > Tracing the nodeType and length of childNodes I get 15 child=20 > nodes and their types are >=20 > 3,1,3,1,3,1,3,1,3,1,3,1,3,1,3.=20 >=20 > I should only have 7 childNodes (7 "periods"). Where have the=20 > 8 text nodes come from? >=20 > thanx > barry.b >=20 >=20 > periods =3D=20 > timetableRoot.getElementsByTagName("periods").item(0).getChildNodes(); > for(var i=3D0;i<periods.length;i++){ > var thisPeriod =3D periods.item(i) // each child node > =20 > if(thisPeriod.nodeType =3D=3D 1){// "1" =3D =20 > DOMNode.ELEMENT_NODE; "3" =3D DOMNode.TEXT_NODE > .... process ... >=20 > - <periods> > + <period currentperiod=3D"NO"> > + <period currentperiod=3D"NO"> > + <period currentperiod=3D"NO"> > + <period currentperiod=3D"NO"> > + <period currentperiod=3D"NO"> > + <period currentperiod=3D"NO"> > + <period currentperiod=3D"NO"> > + <periods> >=20 >=20 > and each <period> has this layout (note: there are 0 to many subjects) >=20 >=20 > <period currentperiod=3D"NO"> > <day_code><![CDATA[ 2 ]]></day_code> > <prd_code><![CDATA[ 1 ]]></prd_code> > <prd_desc><![CDATA[ Period 1 ]]></prd_desc> > <prd_end><![CDATA[ {ts '1970-01-01 09:39:00'} ]]></prd_end> > <prd_start><![CDATA[ {ts '1970-01-01 09:00:00'} ]]></prd_start> > <prd_weight />=20 > <tt_id><![CDATA[ 26 ]]></tt_id> > <subjects> > <subject sub_code=3D"0031"> > <sub_code><![CDATA[ 0031 ]]></sub_code> > <shortdescription><![CDATA[ Mat1 =20 > ]]></shortdescription> > <class><![CDATA[ A ]]></class> > <room><![CDATA[ B3 ]]></room> > <sub_desc><![CDATA[ Mathematics I =20 > ]]></sub_desc> > <tch_code><![CDATA[ LD ]]></tch_code> > <tch_name><![CDATA[ Miss L Dent ]]></tch_name> > </subject> > </subjects> > </period> >=20 >=20 > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from=20 > real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_ide95&alloc_id=14396&op=3Dick > _______________________________________________ > xmljs-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmljs-users >=20 |
From: David J. <dj...@ya...> - 2005-04-13 05:10:40
|
You're probably seeing the white space in your XML turned into XML nodes. In XML, whitespace is non-trivial and can be included as part of the document as its own node. XML for <SCRIPT> provides a way to turn this feature off in the DOMImplementation object. See http://xmljs.sourceforge.net/website/documentation-w3cdom-DOMImplementation.html#DOMImplementationpreserveWhiteSpace for more info. It should be off by default though. Are you turning it on for some reason? David --- Barry Beattie <Ba...@al...> wrote: > (this list has been so quiet that I'm wondering if I'm still subscribed...) > > hi all > > I'm really stumped on this (partly because I'm trying to muddle through this while being unwell) > > I've got a bunch of child nodes that are returning alternating (and phantom) types (xml below). > I've had to filter out the "phantoms" with > > if(thisPeriod.nodeType == 1) > > Tracing the nodeType and length of childNodes I get 15 child nodes and their types are > > 3,1,3,1,3,1,3,1,3,1,3,1,3,1,3. > > I should only have 7 childNodes (7 "periods"). Where have the 8 text nodes come from? > > thanx > barry.b > > > periods = timetableRoot.getElementsByTagName("periods").item(0).getChildNodes(); > for(var i=0;i<periods.length;i++){ > var thisPeriod = periods.item(i) // each child node > > if(thisPeriod.nodeType == 1){// "1" = DOMNode.ELEMENT_NODE; "3" = DOMNode.TEXT_NODE > .... process ... > > - <periods> > + <period currentperiod="NO"> > + <period currentperiod="NO"> > + <period currentperiod="NO"> > + <period currentperiod="NO"> > + <period currentperiod="NO"> > + <period currentperiod="NO"> > + <period currentperiod="NO"> > + <periods> > > > and each <period> has this layout (note: there are 0 to many subjects) > > > <period currentperiod="NO"> > <day_code><![CDATA[ 2 ]]></day_code> > <prd_code><![CDATA[ 1 ]]></prd_code> > <prd_desc><![CDATA[ Period 1 ]]></prd_desc> > <prd_end><![CDATA[ {ts '1970-01-01 09:39:00'} ]]></prd_end> > <prd_start><![CDATA[ {ts '1970-01-01 09:00:00'} ]]></prd_start> > <prd_weight /> > <tt_id><![CDATA[ 26 ]]></tt_id> > <subjects> > <subject sub_code="0031"> > <sub_code><![CDATA[ 0031 ]]></sub_code> > <shortdescription><![CDATA[ Mat1 ]]></shortdescription> > <class><![CDATA[ A ]]></class> > <room><![CDATA[ B3 ]]></room> > <sub_desc><![CDATA[ Mathematics I ]]></sub_desc> > <tch_code><![CDATA[ LD ]]></tch_code> > <tch_name><![CDATA[ Miss L Dent ]]></tch_name> > </subject> > </subjects> > </period> > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_ide95&alloc_id396&op=click > _______________________________________________ > xmljs-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmljs-users > |
From: Barry B. <Ba...@al...> - 2005-04-13 03:32:09
|
(this list has been so quiet that I'm wondering if I'm still = subscribed...) hi all I'm really stumped on this (partly because I'm trying to muddle through = this while being unwell) I've got a bunch of child nodes that are returning alternating (and = phantom) types (xml below). I've had to filter out the "phantoms" with=20 if(thisPeriod.nodeType =3D=3D 1) Tracing the nodeType and length of childNodes I get 15 child nodes and = their types are 3,1,3,1,3,1,3,1,3,1,3,1,3,1,3.=20 I should only have 7 childNodes (7 "periods"). Where have the 8 text = nodes come from? thanx barry.b periods =3D = timetableRoot.getElementsByTagName("periods").item(0).getChildNodes(); for(var i=3D0;i<periods.length;i++){ var thisPeriod =3D periods.item(i) // each child node =20 if(thisPeriod.nodeType =3D=3D 1){// "1" =3D DOMNode.ELEMENT_NODE; = "3" =3D DOMNode.TEXT_NODE .... process ... - <periods> + <period currentperiod=3D"NO"> + <period currentperiod=3D"NO"> + <period currentperiod=3D"NO"> + <period currentperiod=3D"NO"> + <period currentperiod=3D"NO"> + <period currentperiod=3D"NO"> + <period currentperiod=3D"NO"> + <periods> and each <period> has this layout (note: there are 0 to many subjects) <period currentperiod=3D"NO"> <day_code><![CDATA[ 2 ]]></day_code> <prd_code><![CDATA[ 1 ]]></prd_code> <prd_desc><![CDATA[ Period 1 ]]></prd_desc> <prd_end><![CDATA[ {ts '1970-01-01 09:39:00'} ]]></prd_end> <prd_start><![CDATA[ {ts '1970-01-01 09:00:00'} ]]></prd_start> <prd_weight />=20 <tt_id><![CDATA[ 26 ]]></tt_id> <subjects> <subject sub_code=3D"0031"> <sub_code><![CDATA[ 0031 ]]></sub_code> <shortdescription><![CDATA[ Mat1 ]]></shortdescription> <class><![CDATA[ A ]]></class> <room><![CDATA[ B3 ]]></room> <sub_desc><![CDATA[ Mathematics I ]]></sub_desc> <tch_code><![CDATA[ LD ]]></tch_code> <tch_name><![CDATA[ Miss L Dent ]]></tch_name> </subject> </subjects> </period> |
From: James S. E. <jam...@co...> - 2005-03-25 21:42:01
|
Sanjeev, This may be superfluous since David has provided a more detailed explanation but, when working with DOM attribute nodes, never assume the value will be a native string in the programming language you're using. DOM objects are built on DOM-specific primitive types - for portablilty among languages, I guess. Regards, James S. Elkins At 10:25 PM 3/24/2005, you wrote: >Send xmljs-users mailing list submissions to > xml...@li... > >To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/xmljs-users >or, via email, send a message with subject or body 'help' to > xml...@li... > >You can reach the person managing the list at > xml...@li... > >When replying, please edit your Subject line so it is more specific >than "Re: Contents of xmljs-users digest..." > > >Today's Topics: > > 1. Comparision values returned by getAttribute() (san...@ya...) > 2. Re: Comparision values returned by getAttribute() (David Joham) > >--__--__-- > >Message: 1 >Date: Thu, 24 Mar 2005 12:12:27 -0800 (PST) >From: <san...@ya...> >To: xml...@li... >Subject: [xmljs-users] Comparision values returned by getAttribute() > >It seems like comparing the string value returned by >getAttribute() always results in failure even though >they have the same value: > > >Why is this? Is there a way around this? > >thanks. >Sanjeev > > >--__--__-- > >Message: 2 >Date: Thu, 24 Mar 2005 12:49:57 -0800 (PST) >From: David Joham <dj...@ya...> >Subject: Re: [xmljs-users] Comparision values returned by getAttribute() >To: san...@ya..., xml...@li... > > >Wow, you learn something new every day... > >The reason you're seeing this is that the attribute value variables are >created like this: >atributeValue = new String(valueFromXML); > >What I didn't know until just now is that if you have the following >construct in JavaScript, >you'll be doing an object comparison rather than a string comparison: > >var x = new String("FOO"); >var y = new String("FOO"); > >//object comparison >alert(x==y); > >If you do an alert(typeof x), you'll get a return value of "object" rather >than "string" > >This is why your comparison is failing, but I without more research I >can't tell you why creating >a string with new String() doesn't actually create a "string" object. > > >Thankfully, the fix is easy :) > >On or about line 2859 in xmlw3cdom.js, you'll see a line of code that says >"return ret". The fix >is to change that line to "return ret.toString()" > >I've included the full function below (with the fix) just to provide more >context: >DOMElement.prototype.getAttribute = function DOMElement_getAttribute(name) { > var ret = ""; > > // if attribute exists, use it > var attr = this.attributes.getNamedItem(name); > > if (attr) { > ret = attr.value; > } > > return ret.toString(); // if Attribute exists, return its value, > otherwise, return "" >}; > > >Hopefully that will get you going. By the way, thanks for the *great* >testcase. > >Good luck! > >David > >--- san...@ya... wrote: > > It seems like comparing the string value returned by > > getAttribute() always results in failure even though > > they have the same value: > > > > <HTML> > > <head> > > <title>Test</title> > > </head> > > <script src="../jsXMLParser/xmlw3cdom.js"></script> > > <script src="../jsXMLParser/xmlsax.js"></script> > > <script> > > function foo(){ > > var strXML = "<root id=\"root\"><child > > id=\"child1\"/><child id=\"child1\"/></root>"; > > > > //instantiate the W3C DOM Parser > > var parser = new DOMImplementation(); > > > > //load the XML into the parser and get the > > DOMDocument > > var domDoc = parser.loadXML(strXML); > > > > var children = > > domDoc.getDocumentElement().getChildNodes(); > > > > > > var str1 = children.item(0).getAttribute("id"); > > var str2 = children.item(1).getAttribute("id") > > > > alert ("str1 = " + str1 + ", str2 = " + str2); > > > > alert(str1 == str2); //always false <======== > > } > > </script> > > <BODY onload="foo()"> > > </BODY> > > </HTML> > > > > Why is this? Is there a way around this? > > > > thanks. > > Sanjeev > > > > > > ------------------------------------------------------- > > SF email is sponsored by - The IT Product Guide > > Read honest & candid reviews on hundreds of IT Products from real users. > > Discover which products truly live up to the hype. Start reading now. > > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > > _______________________________________________ > > xmljs-users mailing list > > xml...@li... > > https://lists.sourceforge.net/lists/listinfo/xmljs-users > > > > > >--__--__-- > >_______________________________________________ >xmljs-users mailing list >xml...@li... >https://lists.sourceforge.net/lists/listinfo/xmljs-users > > >End of xmljs-users Digest |
From: David J. <dj...@ya...> - 2005-03-24 20:50:06
|
Wow, you learn something new every day... The reason you're seeing this is that the attribute value variables are created like this: atributeValue = new String(valueFromXML); What I didn't know until just now is that if you have the following construct in JavaScript, you'll be doing an object comparison rather than a string comparison: var x = new String("FOO"); var y = new String("FOO"); //object comparison alert(x==y); If you do an alert(typeof x), you'll get a return value of "object" rather than "string" This is why your comparison is failing, but I without more research I can't tell you why creating a string with new String() doesn't actually create a "string" object. Thankfully, the fix is easy :) On or about line 2859 in xmlw3cdom.js, you'll see a line of code that says "return ret". The fix is to change that line to "return ret.toString()" I've included the full function below (with the fix) just to provide more context: DOMElement.prototype.getAttribute = function DOMElement_getAttribute(name) { var ret = ""; // if attribute exists, use it var attr = this.attributes.getNamedItem(name); if (attr) { ret = attr.value; } return ret.toString(); // if Attribute exists, return its value, otherwise, return "" }; Hopefully that will get you going. By the way, thanks for the *great* testcase. Good luck! David --- san...@ya... wrote: > It seems like comparing the string value returned by > getAttribute() always results in failure even though > they have the same value: > > <HTML> > <head> > <title>Test</title> > </head> > <script src="../jsXMLParser/xmlw3cdom.js"></script> > <script src="../jsXMLParser/xmlsax.js"></script> > <script> > function foo(){ > var strXML = "<root id=\"root\"><child > id=\"child1\"/><child id=\"child1\"/></root>"; > > //instantiate the W3C DOM Parser > var parser = new DOMImplementation(); > > //load the XML into the parser and get the > DOMDocument > var domDoc = parser.loadXML(strXML); > > var children = > domDoc.getDocumentElement().getChildNodes(); > > > var str1 = children.item(0).getAttribute("id"); > var str2 = children.item(1).getAttribute("id") > > alert ("str1 = " + str1 + ", str2 = " + str2); > > alert(str1 == str2); //always false <======== > } > </script> > <BODY onload="foo()"> > </BODY> > </HTML> > > Why is this? Is there a way around this? > > thanks. > Sanjeev > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > xmljs-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmljs-users > |
From: <san...@ya...> - 2005-03-24 20:12:34
|
It seems like comparing the string value returned by getAttribute() always results in failure even though they have the same value: <HTML> <head> <title>Test</title> </head> <script src="../jsXMLParser/xmlw3cdom.js"></script> <script src="../jsXMLParser/xmlsax.js"></script> <script> function foo(){ var strXML = "<root id=\"root\"><child id=\"child1\"/><child id=\"child1\"/></root>"; //instantiate the W3C DOM Parser var parser = new DOMImplementation(); //load the XML into the parser and get the DOMDocument var domDoc = parser.loadXML(strXML); var children = domDoc.getDocumentElement().getChildNodes(); var str1 = children.item(0).getAttribute("id"); var str2 = children.item(1).getAttribute("id") alert ("str1 = " + str1 + ", str2 = " + str2); alert(str1 == str2); //always false <======== } </script> <BODY onload="foo()"> </BODY> </HTML> Why is this? Is there a way around this? thanks. Sanjeev |
From: David J. <dj...@ya...> - 2005-02-05 21:43:45
|
From what I gather you're trying to do, it looks like your going in the right direction... Good luck! David --- Eljon Greene <eg...@re...> wrote: > In the example below, the function would be moveSectionUp() or moveSectionDown(). Those > functions call updateNode(), which is I function I wrote to find the node and use > tNode.getFirstChild().setNodeValue(tValue), which actually resets the order of the section. I > think your idea of re-ordering the nodelist is something I had not considered but should be > possible once I think it out....Thanks for the inspiration... > > So far i have come up with....This function would be called right before I save the XML object > to the hidden form field. > > > function reOrderNodes(){ > // Re-order the nodes so that the XML document accurately reflects the changes made > var tSections = pageRoot.getElementsByTagName(sectionElement); // sectionElement = 'section' > var tTempObj = null; // used to temporary swap nodes > var i = 0; > > // First do sections > tCurrentSection = pageRoot.getElementsByTagName(sectionElement).item(i); > tCurrentSectionOrder = tCurrentSection.getElementsByTagName(orderElement).item(i); // > orderElement = 'orderNumber' > > while(tCurrentSection.getNextSibling() != null) { > > tNextSection = pageRoot.getElementsByTagName(sectionElement).item(i+1); > tNextSectionOrder = tNextSection.getElementsByTagName(orderElement).item(0); > > // if current section order is greater than next section swap > if(tCurrentSectionOrder.getFirstChild().getNodeValue() > > tNextSectionOrder.getFirstChild().getNodeValue()) { > tTempObj = tCurrentSection; > tCurrentSection = tNextSection; > tNextSection = tTempObj; > } else { > break; > } > > tCurrentSection = pageRoot.getElementsByTagName(sectionElement).item(i); > i++; > } > } > > Let me know if I am now in the right direction...Thanks... > > P.S. I had plans to work alittle this weekend on this but I might not...Super Bowl is in > town...Party on!!!!!!!!!!!!! > > Eljon Greene > CE Software Engineer > 877.394.5644 \\ main > 904.567.2127 \\ direct > eg...@re... > www.recruitmax.com > > > > > From: David Joham > Sent: Fri 2/4/2005 5:53 PM > To: Eljon Greene; xml...@li... > Subject: Re: [xmljs-users] Re-ordering XML data... > > > Can you do a quick example (just the XML below and how you're trying to manipulate it) so I can > take a look this weekend? I know the XPATH stuff in xmljs is pretty basic and probably doesn't > support what you're looking for, but it may be possible to enhance it to support what you're > looking for. At the very least, it should be easy to create a function that will reorder a > nodelist in whatever way you're looking for... > > David > > --- Eljon Greene <eg...@re...> wrote: > > > Hi, > > > > This is my last hurdle to overcome (I think) in using XML and the xmlJS library. I use this > > technology to allow users to control the layout (order, active/inactive, labeling) of pages in > > our application. However the ordering is based on an <orderNumber> element I created by it > does > > not change the "position" of the <section> in the XML file. My question is there a way to > > re-order elements? I can only display the elements by using the XPath position() function. > > Here is the way it works now and the desired result: > > > > How it looks now: > > > > > > <section> > > <id>1</id> > > <name>My Section</name> > > <orderNumber>02</orderNumber> > > <active>Yes</active> > > <locked>Yes</locked> > > </section> > > <section> > > <id>2</id> > > <name>My Other Section</name> > > <orderNumber>01</orderNumber> > > <active>Yes</active> > > <locked>Yes</locked> > > </section> > > The desired results: > > > > <section> > > <id>2</id> > > <name>My Other Section</name> > > <orderNumber>01</orderNumber> > > <active>Yes</active> > > <locked>Yes</locked> > > </section> > > <section> > > <id>1</id> > > <name>My Section</name> > > <orderNumber>02</orderNumber> > > <active>Yes</active> > > <locked>Yes</locked> > > </section> > > > > Thanks. > > > > Eljon Greene > > CE Software Engineer > > 877.394.5644 \\ main > > 904.567.2127 \\ direct > > eg...@re... > > www.recruitmax.com > > > |
From: Eljon G. <eg...@re...> - 2005-02-04 23:44:20
|
In the example below, the function would be moveSectionUp() or moveSectionD= own(). Those functions call updateNode(), which is I function I wrote to f= ind the node and use tNode.getFirstChild().setNodeValue(tValue), which actu= ally resets the order of the section. I think your idea of re-ordering the= nodelist is something I had not considered but should be possible once I t= hink it out....Thanks for the inspiration... So far i have come up with....This function would be called right before I = save the XML object to the hidden form field. function reOrderNodes(){ // Re-order the nodes so that the XML document accurately reflects the cha= nges made var tSections =3D pageRoot.getElementsByTagName(sectionElement); // secti= onElement =3D 'section' var tTempObj =3D null; // used to temporary swap nodes var i =3D 0; =20 // First do sections tCurrentSection =3D pageRoot.getElementsByTagName(sectionElement).item(i)= ; tCurrentSectionOrder =3D tCurrentSection.getElementsByTagName(orderElemen= t).item(i); // orderElement =3D 'orderNumber' =20 while(tCurrentSection.getNextSibling() !=3D null) { =20 tNextSection =3D pageRoot.getElementsByTagName(sectionElement).item(i+1)= ; tNextSectionOrder =3D tNextSection.getElementsByTagName(orderElement).it= em(0); =20 // if current section order is greater than next section swap if(tCurrentSectionOrder.getFirstChild().getNodeValue() > tNextSectionOrd= er.getFirstChild().getNodeValue()) { tTempObj =3D tCurrentSection; tCurrentSection =3D tNextSection; tNextSection =3D tTempObj; } else { break; } =20 tCurrentSection =3D pageRoot.getElementsByTagName(sectionElement).item(i= ); i++; } }=20 Let me know if I am now in the right direction...Thanks... P.S. I had plans to work alittle this weekend on this but I might not...Su= per Bowl is in town...Party on!!!!!!!!!!!!! Eljon Greene CE Software Engineer 877.394.5644 \\ main 904.567.2127 \\ direct eg...@re... www.recruitmax.com From: David Joham Sent: Fri 2/4/2005 5:53 PM To: Eljon Greene; xml...@li... Subject: Re: [xmljs-users] Re-ordering XML data... Can you do a quick example (just the XML below and how you're trying to man= ipulate it) so I can take a look this weekend? I know the XPATH stuff in xmljs is pretty basic a= nd probably doesn't support what you're looking for, but it may be possible to enhance it to su= pport what you're looking for. At the very least, it should be easy to create a function that= will reorder a nodelist in whatever way you're looking for... David --- Eljon Greene <eg...@re...> wrote: > Hi, >=20 > This is my last hurdle to overcome (I think) in using XML and the xmlJS l= ibrary. I use this > technology to allow users to control the layout (order, active/inactive, = labeling) of pages in > our application. However the ordering is based on an <orderNumber> eleme= nt I created by it does > not change the "position" of the <section> in the XML file. My question = is there a way to > re-order elements? I can only display the elements by using the XPath po= sition() function.=20 > Here is the way it works now and the desired result: >=20 > How it looks now: >=20 >=20 > <section> > <id>1</id> > <name>My Section</name> > <orderNumber>02</orderNumber> > <active>Yes</active> > <locked>Yes</locked> > </section> > <section> > <id>2</id> > <name>My Other Section</name> > <orderNumber>01</orderNumber> > <active>Yes</active> > <locked>Yes</locked> > </section> > The desired results: >=20 > <section> > <id>2</id> > <name>My Other Section</name> > <orderNumber>01</orderNumber> > <active>Yes</active> > <locked>Yes</locked> > </section> > <section> > <id>1</id> > <name>My Section</name> > <orderNumber>02</orderNumber> > <active>Yes</active> > <locked>Yes</locked> > </section> >=20 > Thanks. >=20 > Eljon Greene > CE Software Engineer > 877.394.5644 \\ main > 904.567.2127 \\ direct > eg...@re... > www.recruitmax.com >=20 |
From: David J. <dj...@ya...> - 2005-02-04 22:53:11
|
Can you do a quick example (just the XML below and how you're trying to manipulate it) so I can take a look this weekend? I know the XPATH stuff in xmljs is pretty basic and probably doesn't support what you're looking for, but it may be possible to enhance it to support what you're looking for. At the very least, it should be easy to create a function that will reorder a nodelist in whatever way you're looking for... David --- Eljon Greene <eg...@re...> wrote: > Hi, > > This is my last hurdle to overcome (I think) in using XML and the xmlJS library. I use this > technology to allow users to control the layout (order, active/inactive, labeling) of pages in > our application. However the ordering is based on an <orderNumber> element I created by it does > not change the "position" of the <section> in the XML file. My question is there a way to > re-order elements? I can only display the elements by using the XPath position() function. > Here is the way it works now and the desired result: > > How it looks now: > > > <section> > <id>1</id> > <name>My Section</name> > <orderNumber>02</orderNumber> > <active>Yes</active> > <locked>Yes</locked> > </section> > <section> > <id>2</id> > <name>My Other Section</name> > <orderNumber>01</orderNumber> > <active>Yes</active> > <locked>Yes</locked> > </section> > The desired results: > > <section> > <id>2</id> > <name>My Other Section</name> > <orderNumber>01</orderNumber> > <active>Yes</active> > <locked>Yes</locked> > </section> > <section> > <id>1</id> > <name>My Section</name> > <orderNumber>02</orderNumber> > <active>Yes</active> > <locked>Yes</locked> > </section> > > Thanks. > > Eljon Greene > CE Software Engineer > 877.394.5644 \\ main > 904.567.2127 \\ direct > eg...@re... > www.recruitmax.com > |
From: Eljon G. <eg...@re...> - 2005-02-04 22:25:27
|
Hi, This is my last hurdle to overcome (I think) in using XML and the xmlJS lib= rary. I use this technology to allow users to control the layout (order, a= ctive/inactive, labeling) of pages in our application. However the orderin= g is based on an <orderNumber> element I created by it does not change the = "position" of the <section> in the XML file. My question is there a way to= re-order elements? I can only display the elements by using the XPath pos= ition() function. Here is the way it works now and the desired result: How it looks now: <section> <id>1</id> <name>My Section</name> <orderNumber>02</orderNumber> <active>Yes</active> <locked>Yes</locked> </section> <section> <id>2</id> <name>My Other Section</name> <orderNumber>01</orderNumber> <active>Yes</active> <locked>Yes</locked> </section> The desired results: <section> <id>2</id> <name>My Other Section</name> <orderNumber>01</orderNumber> <active>Yes</active> <locked>Yes</locked> </section> <section> <id>1</id> <name>My Section</name> <orderNumber>02</orderNumber> <active>Yes</active> <locked>Yes</locked> </section> Thanks. Eljon Greene CE Software Engineer 877.394.5644 \\ main 904.567.2127 \\ direct eg...@re... www.recruitmax.com |
From: g.e.c.c.o <g.e...@gm...> - 2005-01-27 15:29:17
|
hi everyone, i have a "little" problem I have to pass a XML File in an HTML file with JavaScript and the EventHandler "ondragdrop". The XML file should be placed with "drag&drop" in an existing html table which is loaded before in the browser. Then the cells of the table in the html page should be filled in with the Information form the XML Document. Can somebody help me ?? Maybe somepne already have such a code example? Thanks for helping from Austria Bye Bernd Hochwarter |
From: Eljon G. <eg...@re...> - 2005-01-23 18:08:09
|
Yes, =20 After having David assist me, it was a matter of not fully understanding = the API that cause the implementation issues... =20 Eljon Greene CE Software Engineer 877.394.5644 \\ main 904.567.2127 \\ direct eg...@re... <mailto:eg...@re...>=20 www.recruitmax.com <http://www.recruitmax.com>=20 ________________________________ From: xml...@li... on behalf of Barry Beattie Sent: Sun 1/23/2005 6:32 AM To: xml...@li... Subject: RE: [xmljs-users] xmljs issues.... I take it that this is a specific implementation issue and as such does = not specifically reflect on the XMLforScript API? I just ask 'cos we use coldfusion too... thanx Needlessly Nervous Nellie... -----Original Message----- From: xml...@li... on behalf of David Joham Sent: Sat 1/22/2005 10:47 AM To: Eljon Greene; xml...@li... Cc: =20 Subject: Re: [xmljs-users] xmljs issues.... I've replied privately to this email.... David --- Eljon Greene <eg...@re...> wrote: > David, > > I have a very high profile application built for our company that uses = your API...I have built > my own XML framework to be manipulated by xml for <script>. I have = found some issues I have > made and corrected them only to go back and the issues seem to be = there again...It is very > frustrating...Many many people are waiting on me to fix this and our = next release goes out next > week...Do you do consulting and can possibly help me? We use = ColdFusion here...I can assist you > with understanding what I am doing on the server-side...Thanks... > > Eljon Greene > CE Software Engineer > 877.394.5644 \\ main > 904.567.2127 \\ direct > eg...@re... > www.recruitmax.com > ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ xmljs-users mailing list xml...@li... https://lists.sourceforge.net/lists/listinfo/xmljs-users ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ xmljs-users mailing list xml...@li... https://lists.sourceforge.net/lists/listinfo/xmljs-users |
From: Barry B. <Ba...@al...> - 2005-01-23 11:32:00
|
I take it that this is a specific implementation issue and as such does = not specifically reflect on the XMLforScript API? I just ask 'cos we use coldfusion too... thanx Needlessly Nervous Nellie... =20 -----Original Message----- From: xml...@li... on behalf of David Joham Sent: Sat 1/22/2005 10:47 AM To: Eljon Greene; xml...@li... Cc:=09 Subject: Re: [xmljs-users] xmljs issues.... I've replied privately to this email.... David --- Eljon Greene <eg...@re...> wrote: > David, >=20 > I have a very high profile application built for our company that uses = your API...I have built > my own XML framework to be manipulated by xml for <script>. I have = found some issues I have > made and corrected them only to go back and the issues seem to be = there again...It is very > frustrating...Many many people are waiting on me to fix this and our = next release goes out next > week...Do you do consulting and can possibly help me? We use = ColdFusion here...I can assist you > with understanding what I am doing on the server-side...Thanks... >=20 > Eljon Greene > CE Software Engineer > 877.394.5644 \\ main > 904.567.2127 \\ direct > eg...@re... > www.recruitmax.com >=20 ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ xmljs-users mailing list xml...@li... https://lists.sourceforge.net/lists/listinfo/xmljs-users |