NodeScript:

All your scripting needs;
Client side,
Server side,
Database side.

NodeScripting.

Do node have it's own defined database?

If not, consider this please!

http://www.jsdb.org

It's a open source database define for JavaScript. It use E4X to query data 
between XML and JSON.

I talk to the creature, and spoke my suggestion on improving it. He said that I 
could do it, but he is currently to busy to attain to it anymore.

I suggest to strip all of E4X feature, EXCEPT the XML object.

Change it's name to DOM(); to mean an document object model query tool, and not 
the actually document. Keep it's methods and properties.

var doc = DOM();

Doc.load("note.xml");
Doc.load("page.html");
Doc.load("page.xhtml");
Doc.load("pageschema.xsd");
Doc.load("pagetransform.xslt");
Doc.load("database.json");

For example:

XML file to be use:
<note> 
  <date>2002-08-01</date>    
  <to>Tove</to>
  <from>Jani</from> 
  <heading>Reminder</heading> 
  <body>Don't forget me this weekend!</body> 
</note>

Example:
var Doc=new DOM();
Doc.load("note.xml");

console.log(Doc.note.body);

A display of a few methods:

This /**"/note/body"**/ is within body element as the last child, after the 
textNode:
xmlDoc[4].body.ps = "also, don't forget to bring a jacket";

note that body is an object, as note is an array of elements that cannot hold 
node text. The ps in front adds a new element to body <ps>"Also, don't forget 
to bring a jacket!"</ps>:

<note>
<!--...-->
  <body>
Don't forget me this weekend!
    <ps>
"Also, don't forget to bring a jacket!"
    </ps>
  </body> 
</note>


This /**"/note/"**/ is after body element:
xmlDoc.note[note.length ].concat("<ps>also, don't forget to bring a 
jacket</ps>");

<note>
<!--...-->
  <body>
Don't forget me this weekend!
  </body> 
  <ps>
"Also, don't forget to bring a jacket!"
  </ps>
</note>

This /**"/note/"**/ is before body element (note: index 4 is note's child 
heading element)


The following example is the same as: 
var note = ["date","to","from","heading","body"];
note.splice(4,0,"ps");
note;//output: ["date","to","from","heading","ps","body"];


xmlDoc.splice(4, 0 , "<ps>also, don't forget to bring a jacket</ps>");

Don't know if you check and approve the post first, or did I just press discard.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/94fde284-68d9-4e60-803c-7ed794fc22e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to