Comments (4)
The described solution (1) would be tricky to implement, but possible from within the XmlBuilder during the building of the tree. Unfortunately I am quite busy right now, so I don't have the time to look into it. However, free to submit a pull-request.
Alternatively (and if you don't want to modify the library) you could write a visitor over the built XML tree that transforms it into an optimised tree. Implementation wise I think this solution would even be simpler, albeit less efficient as the tree needs to be re-traversed and copied.
from dart-xml.
I will try to give it a look this week, time isn't my best friend either.
from dart-xml.
I got both 1 and 2 implemented. However, I want to know how you want users to opt-in or opt-out for the enhancements.
I'll make a PR and ask you there.
from dart-xml.
This is fixed with aebf5bd.
from dart-xml.
Related Issues (20)
- Questions about event-drive api HOT 6
- Single `XmlText` is split into two `XmlTextEvent` HOT 2
- Builder is appending duplicate attributes instead of overwriting the existing one. HOT 1
- XmlElement.setAttribute can create duplicate attribute if the name contains a colon HOT 3
- Dependency issues HOT 3
- Flutter error : 'XmlText' isn't a type. HOT 1
- 2.11 End-of-Line Handling HOT 3
- Parse file that does not have closing tags HOT 2
- How can I transform XML with XSL? HOT 3
- How to remove node from xml HOT 2
- How to omit xml declaration and remove indentation? HOT 3
- How to add new line before each attribute? HOT 1
- How to convert xml to string without backslahes HOT 2
- entityMapping: Works unexpectedly HOT 3
- New release with XPath support? HOT 3
- isSelfClosing not working HOT 5
- XmlParserException: ">" expected at 1:16 HOT 3
- Parsing does not work starting with 6.2.2 HOT 3
- Validate XML file against XSD HOT 1
- Support custom entities HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dart-xml.