peerlibrary / node-xml4js

XML to JavaScript parser using XML Schema to guide conversion
BSD 3-Clause "New" or "Revised" License
60 stars 11 forks source link

require schema seems always on #7

Open hank123 opened 9 years ago

hank123 commented 9 years ago

Do you have an example on how to turn on schema validation. I followed the example you have from readme, but it seems always validating against schema.

thanks you

mitar commented 9 years ago

I do not understand your question. What exactly does not work?

hank123 commented 9 years ago

I am sorry, I mean turn off schema validation. I want to test xml4js without using schema validation. I also want to see if the fields are double quotes. I tried xml2js , but the generated json fields are not double quoted, is there a way to make it double quoted in xml2js ?

thank you !

Hank

mitar commented 9 years ago

If you do not want schema validation, then you should use xml2js. What you mean if fields are double quotes?

jameshowe commented 9 years ago

+1 you don't always want to use schema validation and having to include both libraries to support these 2 scenarios seems unnecessary, particularly when this one is capable of doing everything.

mitar commented 9 years ago

Pull request welcome. :-)

mitar commented 8 years ago

having to include both libraries to support these 2 scenarios seems unnecessary

This library depends on xml2js anyway, so you are already "including" both. Now, is is really so hard to make require/import the package you need?

But I agree, this could be a configuration switch. It is probably an easy contribution to make. So please do so.

jameshowe commented 8 years ago

@mitar of course it's not hard, it's just messy.

I'm no longer using this library as xml2js doesn't have support for streaming, however, I still think a configuration option would be useful.

mitar commented 8 years ago

True. Streaming would be very useful.