« Example | Main | my rss2html.js »

Thursday, July 14, 2005

xmlText(node)

convert node to string.

for example

var xml="<data><v>text1</v><v>text2></v></data>";
var dom=xmlParse(xml);
var text=xmlText(dom);
alert(text);
// return "<data><v>text1</v><v>text2></v></data>"

Posted by at 8:16 AM
Edited on: Thursday, July 14, 2005 8:25 AM
Categories: misc.js

xmlValue(node)

return text only value.

for example

var xml="<data><v>text1</v><v>text2></v></data>";
var dom=xmlParse(xml);
var text=xmlValue(dom);
alert(text);

// return "text1text"

Posted by at 8:12 AM
Edited on: Thursday, July 14, 2005 8:14 AM
Categories: misc.js

stringSplit(text,splitCharacter)

splitting strings by selected character.

for example
var text="line1\nline2\nline3";

var vs=stringSplit(text,'\n');

Posted by at 8:06 AM
Categories: misc.js

el(id)

simple

function el(i) {

return document.getElementById(i);

}

Posted by at 7:52 AM
Edited on: Thursday, July 14, 2005 8:07 AM
Categories: misc.js