colorhook / jsxml Goto Github PK
View Code? Open in Web Editor NEWjsxml is an XML library for javascript and node
License: Other
jsxml is an XML library for javascript and node
License: Other
Hi,
When I try to parse this xml, I have an 'the start tag is invalid' error:
<DataFeed xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Row Weekday_vs._weekend="Monday" /></DataFeed>
When I remove the '.', I have no error:
<DataFeed xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Row Weekday_vs_weekend="Monday" /></DataFeed>
Could you change the regexp startTag to include the '.' please?
Thank you so much,
Anne-Laure
given the xml:
<definitions id="definitions_9d5c24a2-a605-4b78-85cd-c14c44a0cc69">
<process id="pid-c236ca2f-e724-458c-b377-ed0f020268ef">
<startEvent id="startevent1" name="message incoming">
<outgoing>startevent1-gateway1</outgoing>
</startEvent>
</process>
</definitions>
Is there any possibility to add a prefix, e.g. "bpmn", to all nodes so that looks like this?:
<bpmn:definitions id="definitions_9d5c24a2-a605-4b78-85cd-c14c44a0cc69">
<bpmn:process id="pid-c236ca2f-e724-458c-b377-ed0f020268ef">
<bpmn:startEvent id="startevent1" name="message incoming">
<bpmn:outgoing>startevent1-gateway1</bpmn:outgoing>
</bpmn:startEvent>
</bpmn:process>
</bpmn:definitions>
remove: function() {
if (!this._parent) {
return;
}
var nk = this._nodeKind;
var list;
if (nk === NodeKind.ATTRIBUTE) {
list = this._parent._attributes;
} else {
list = this._parent._children;
}
var index = list.indexOf(this);
if (index !== -1) {
list.splice(i, 1)
}
}
Function is calling list.splice(i,1)
, rather than list.splice(index,1)
- causing the incorrect attribute to be removed in some cases.
Fix in PR #9
Hello,
When I try to parse this xml, I have an 'the start tag is invalid' error:
<DataFeed xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Row TrancheHoraire="0:0" EPEnvoyésCumulés="1"/></DataFeed>
When I remove the 'é', I have no error:
Could you change the regexp startTag to include the letters with accent please?
Thank you so much,
Anne-Laure
Hi, how I can delete or remove a child node from xml?
I think this setting creates xml content with additionnal line break.
Given :
<root>
<property>value</property>
</root>
when i ask for toString, then the content is :
<root>
<property>value</property>
</root>
instead of the same string.
Here is the spec:
var expect = require('chai').expect;
var XML = require('node-jsxml').XML;
describe('jsxml', function () {
it('can display original content', function () {
var originalContent =
'<root>\n' +
' <property>value</property>\n' +
'</root>';
XML.setSettings({ignoreWhitespace: false});
var xml = new XML(originalContent);
var content = xml.toString();
expect(content).to.be.equal(originalContent);
});
});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.