TypeScript.NET
TypeScript.NET copied to clipboard
System.Xml.Linq
would like to see system.Xml.Linq in the awesome library. maybe this code can be integrated: http://ltxmljs.codeplex.com/
Ok!
https://github.com/electricessence/TypeScript.NET/tree/develop-%28System.Xml.Linq%29 Feel free to track this branch. I've done the initial setup to get going. I'll definitely work on it, but if you want to help, please do!
Making progress. Classes are getting their inheritance structure. Still a lot of work to do.
what is the best way to contribute? I sent a small pull request yesterday, not sure if thats the best way.
Well I've got some pretty good momentum right now. The best way to contribute is to code review. Ask questions. Challenge assumptions. It's pretty ragged right now, but things are unfolding well. I'm really for looking at the .NET source and comparing the code to make sure we are following their assumptions.
Also, I didn't see any pull request.
@agnauck: Ok. Made a significant milestone that you could definitely help. I just checked in XObject and I'm confident it is analogous with the C#.NET version. I will assign you a task. :)
what are you plans for serializing and parsing.
Write:
- Implement the .NET XmlWriter
- use a custom simple XmlWriter?
- use some other existing js or ts lib
Parse:
- use the browsers DOMParser like ltxml.js does
- use sax.js
- use something custom, which is quite a challenge ;-)
The XmlWriter will be deferred as long as possible. But my philosophy is this: A class should work as well or better than it's .NET counterpart. The API should either be the same or at least be very very close. Leveraging a browser based parser may exclude being able to use it with Node.js.
Right now, everything is unraveling itself. Meaning, although very difficult, dependencies are being implemented step by step. It's a lot of work, but I enjoy the challenge and I learn a lot.
For example, right now I'm implementing XsdDuration which is an internal dependency for XmlConvert. Seems overkill but I'm simply pushing forward. At first I was quite afraid of the amount of daunting work. But I believe I can slowly and steadily make this happen.
Its to the extent that I was considering writing my own C# parser that would transform C# into TS. For the moment I am using a set of Regex replace patterns to get me closer to the result. https://gist.github.com/electricessence/b575f18dc184beb5cc69
Update: Will take some more time before I start migrating the Xml namespace into the master branch. Changing to AMD became a priority but this is definitely on the horizon.
Update: the traverse methods have been updated with better typing. Work well with node walking.