[nodejs] Looking for a good xml parser in stream mode

225 views
Skip to first unread message

jason.桂林

unread,
Aug 30, 2012, 2:05:21 AM8/30/12
to nod...@googlegroups.com
A protocol using xml, socket stream

first time I recieve 
<root foo="  

2nd time I recieve
 adsf">blabl

3rd time I recieve
a</root><root

Then I should get a xml <root foo="asdf">blabla</root> , and left <root waiting for new coming data.

Any good module to do that?

--
Best regards,

桂林 (Gui Lin)


rektide

unread,
Aug 30, 2012, 2:37:21 AM8/30/12
to nod...@googlegroups.com
On Thu, Aug 30, 2012 at 02:05:21PM +0800, jason.桂林 wrote:
> A protocol using xml, socket stream
> first time I recieve 
> <root foo="  
> 2nd time I recieve
>  adsf">blabl
> 3rd time I recieve
> a</root><root
> Then I should get a xml <root foo="asdf">blabla</root> , and left <root
> waiting for new coming data.
> Any good module to do that?

Still hoping someone makes an streaming Xpath module for Ltx, which seems to be the fastest
streaming xml module out there:
https://npmjs.org/package/ltx

There's an existing xpath module but it's not streaming based:
https://npmjs.org/package/ltx-xpath

Nuno Job

unread,
Aug 30, 2012, 2:43:02 AM8/30/12
to nod...@googlegroups.com, nod...@googlegroups.com
Try saxjs (github.com/isaacs/sax-js)

Streaming path expressions? :) if you want an ee that emit on a path expression just create that module using a sax based parser


Sent from my iPhone
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: 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 post to this group, send email to nod...@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

dhruvbird

unread,
Aug 31, 2012, 9:04:18 AM8/31/12
to nod...@googlegroups.com
imho, node-expat (by @astro) is one of the best things you can use - you require to compile stuff though.
https://github.com/astro/node-expat/

otherwise, you can try http://github.com/robrighter/node-xml


Reply all
Reply to author
Forward
0 new messages