johngeorgewright / angular-xml Goto Github PK
View Code? Open in Web Editor NEWXML module for AngularJS
License: MIT License
XML module for AngularJS
License: MIT License
Get ready for the imminent release of angular v1.2.0.
But... it doesn't if i use the exact bower install like mentioned on the readme.
x2js seems to be installable by bower so i went with that, and that works.
Just thought i'd let you know.
3.4.0
to 3.5.0
.This version is covered by your current version range and after updating it in your project the build failed.
jasmine-core is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 117 commits.
99799f7
Still need some ruby stuff around to release the jasmine-core gem
e8263e3
bump version to 3.5.0
53561ae
Show details of syntax (etc) errors when loading Jasmine's own specs
68f25a7
Don't create env instances in beforeEach
96ba66a
Built distribution
ba4a8d1
Fixed jsdocs
65d9e93
Removed broken & long-disabled JsApiReporter integration specs
2d3ac38
toBeRejectedWithError can expect the error to be Error, not just a subtype
5a219da
Added basic integration tests for all built-in matchers
f056f3b
Fixed indentation
aeb0b73
Merge branch 'dtychshenko-1740-fail-on-no-expectations'
7263a38
Adds new configuration option to failSpecWithNoExpectations that will report specs without expectations as failures if enabled
e8870db
Merge branch 'fix-missing-asynchronous-stacktrace' of https://github.com/prantlf/jasmine into prantlf-fix-missing-asynchronous-stacktrace
35d1508
Show argument diffs in toHaveBeenCalledWith failure messages
19292e4
Stop testing against PhantomJS
There are 117 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
When using:
$httpProvider.interceptors.push('xmlHttpInterceptor');
it tries to convert the response even when it not a xml string anymore (and fails)
Example scenario, in the application an XML is received and transformed like:
transformResponse : function(data) {
return $.parseXML(data);
}
to a dom tree, to be used for xpath expressions.
In this scenario its not required for x2js to kick in and try to convert to json, since its not an xml string anymore
Hi! We've noticed a bug in the library that breaks the whole application when it occurs:
function responseIsXml(response) {
var contentType = response.headers('content-type'),
XML = '/xml',
minIndex = 'text/xml'.indexOf(XML);
return contentType.indexOf(XML) >= minIndex;
}
If for some reason content-type is not set, this fails with a "undefined exception".
Move the logic behind the XML parsing in to a separate service called XMLParser
.
1.18.7
to 1.18.8
.This version is covered by your current version range and after updating it in your project the build failed.
nodemon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 5 commits.
3dfd5cc
chore: Merge branch 'master'
735afd5
fix: docker leaving running pids (via pstree)
eb457be
chore: update issue template
8132db6
docs: Example of how to allow a graceful reload (#1481)
2dcdd0e
docs: how to watch .env files
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Get this on bower
I am sure it isn't a common issue since I'm managing all of my 3rd party packages by using Grunt.
It was unable to detect the window object through the function argument "win", so I changed it to "window".
I am still fairly new to Angular so I am not sure if I am doing anything wrong, please let me know if I am missing something.
npm --version
1.4.16
sh: node_modules/grunt-protractor-runner/node_modules/.bin/webdriver-manager: No such file or directory
npm ERR! [email protected] postinstall: node_modules/grunt-protractor-runner/node_modules/.bin/webdriver-manager update
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is most likely a problem with the angular-xml package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node_modules/grunt-protractor-runner/node_modules/.bin/webdriver-manager update
npm ERR! You can get their info via:
npm ERR! npm owner ls angular-xml
npm ERR! There is likely additional logging output above.
Angular is now officially available as an npm module, tests should be able to use either.
Can you put an exmaple of what this config would look like? Or at least a unit test that I can refer to.
3.1.0
to 3.1.1
.This version is covered by your current version range and after updating it in your project the build failed.
karma is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 2 commits.
361aa3f
chore: release v3.1.1
f0d52ad
fix(config): move puppeteer from dependency to dev-dependency (#3193)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
3.1.1
to 3.1.2
.This version is covered by your current version range and after updating it in your project the build failed.
karma is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 11 commits.
7d4d347
chore: release v3.1.2
5077c18
chore: update contributors
fb05fb1
fix(server): use flatted for json.stringify (#3220)
2682bff
feat(docs): callout the key debug strategies. (#3219)
4e87902
fix(changelog): remove release which does not exist (#3214)
30ff73b
fix(browser): report errors to console during singleRun=false (#3209)
5334d1a
fix(file-list): do not preprocess up-to-date files (#3196)
dc5f5de
fix(deps): upgrade sinon-chai 2.x -> 3.x (#3207)
d38f344
fix(package): bump lodash version (#3203)
ffb41f9
refactor(browser): log state transitions in debug (#3202)
240209f
fix(dep): Bump useragent to fix HeadlessChrome version (#3201)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Is it currently possible to specify an option or flag in $http.get() that sends JSON array requests as XML, or should I manually convert using x2js and then send?
3.3.0
to 3.4.0
.This version is covered by your current version range and after updating it in your project the build failed.
codecov is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 4 commits.
bdb3769
v3.4.0
25a4e6b
Add support for heroku CI (#127)
b811a12
Update to use Jest (#124)
a19d8f6
v3.3.0
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Hi John,
Thanks for this useful tool.
The Content-type header can also contain optional parameters:
Content-Type: application/xml; charset=UTF-8
(see http://www.w3.org/Protocols/rfc1341/4_Content-Type.html )
The test for equality could be replaced with an indexOf:
contentType.indexOf('application/xml') === 0 || contentType.indexOf('text/xml') === 0
while I am working with angular routing, once I used $httpProvider.interceptors.push('xmlHttpInterceptor'); inside the config block, my routing is just left working. When I comment that line, it started to work again.
The documentation suggests the xmlFilter is going to return a ng.element object... but doesn't.
I've been putting it off for a while, but thinking maybe it would be a nicer option to use the x2js library. It adds dependencies, but it could make code a lot cleaner:
angular
.module('myMode', ['xml'])
.controller('Blogs', function ($scope, $http) {
$scope.blogs = $http.get('/blogs.xml');
});
I get the XML similar to this from a wordpress 4 site.
I can parse all the items, but I cant get to the title and link and desc.
<title>W3Schools Home Page</title>
<link>http://www.w3schools.com</link>
<description>Free web building tutorials</description>
<item>
<title>RSS Tutorial</title>
<link>http://www.w3schools.com/rss</link>
<description>New RSS tutorial on W3Schools</description>
</item>
<item>
<title>XML Tutorial</title>
<link>http://www.w3schools.com/xml</link>
<description>New XML tutorial on W3Schools</description>
</item>
</channel>
1.18.5
to 1.18.6
.This version is covered by your current version range and after updating it in your project the build failed.
nodemon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 1 commits.
521eb1e
fix: restart on change for non-default signals (#1409) (#1430)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
I have tried to use your example and add elements to the xml like so:
For some reason I can only get to the first element doing this:
$http.get('view1/blogs.xml').success(function (data) {
$scope.blogs = data.blogs;
console.log($scope.blogs);
});
Is there a way to get it as an array of objects?
Would you mind uploading a quick XML example?
Thanks
4.1.0
to 4.2.0
.This version is covered by your current version range and after updating it in your project the build failed.
karma is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 13 commits.
42933c9
chore: release v4.2.0
db1ea57
chore: update contributors
a1049c6
chore: update eslint packages to latest and fix complaints (#3312)
70b72a9
fix(logging): Util inspect for logging the config. (#3332)
1087926
fix typo: (#3334)
182c04d
fix(reporter): format stack with 1-based column (#3325)
f0c4677
docs(travis): Correct the docs to also show how to do it on Xenial (#3316)
3aea7ec
chore(deps): update core-js -> ^3.1.3 (#3321)
5e11340
chore: revert back to Mocha 4 (#3313)
1205bce
chore(test): fix flaky test cases (#3314)
7f40349
Cleanup dependencies (#3309)
7828bea
chore: update braces and chokidar to latest versions (#3307)
fe9a1dd
fix(server): Add error handler for webserver socket. (#3300)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
1.1.0
to 1.2.0
.This version is covered by your current version range and after updating it in your project the build failed.
karma-firefox-launcher is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 13 commits.
a398dae
chore(release): 1.2.0
c1a3939
fix: Detect and kill browser process when launcher process is being used (#103)
c3fea39
chore: Update dependencies
2e94873
chore: Add missing is-wsl entry to yarn.lock
b4e260e
feat: Add support for running Windows Firefox from WSL
2443631
chore: Add self to contributors
2dca609
chore: Update dev dependencies
16e6673
chore: Sort contributors list [skip ci]
9e86d04
chore: Drop support for Node 6 (#98)
540c1dd
fix: Add -wait-for-browser
6377ee3
fix: Look for other paths for Firefox Nightly on Windows and Mac
b9455c8
chore: Fix travis (#97)
0e37f76
feat(headless): add enable remote debugging by default
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
3.0.4
to 3.0.5
.This version is covered by your current version range and after updating it in your project the build failed.
commitizen is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 1 commits.
0eded0a
fix(package): avoid depending on flatmap-stream (#591)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:
.nvmrc
with the new oneIf you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.
Greenkeeper has checked the engines
key in any package.json
file, the .nvmrc
file, and the .travis.yml
file, if present.
engines
was only updated if it defined a single version, not a range..nvmrc
was updated to Node.js 10.travis.yml
was only changed if there was a root-level node_js
that didn’t already include Node.js 10, such as node
or lts/*
. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.For many simpler .travis.yml
configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Doing my best to cut and paste your README code, I am stuck on
TypeError: Object [object Object] has no method 'attrs'
at http://localhost:8000/app/js/blogs.js:20:29
Nice project, works great reading my RSS feed.
However the project is missing an explicit license, perhaps you could add one?
Cheers,
Rob
Is there a way to specify which files to convert and which files to let through as is? Maybe the ability to add some req expressions to integrate the path and filename in the request?
4.17.0
to 4.17.1
.This version is covered by your current version range and after updating it in your project the build failed.
express is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 3 commits.
e1b45eb
4.17.1
0a48e18
Revert "Improve error message for null/undefined to res.status"
eed05a1
build: [email protected]
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
... what it says on the tin
3.1.1
to 3.1.2
.This version is covered by your current version range and after updating it in your project the build failed.
commitizen is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 5 commits.
4417fcf
fix: release fixed sem-release (#648)
b3dd4c4
fix: update dependencies for security (#645)
1875a38
fix(deps): update dependency lodash to v4.17.14 [security] (#641)
372c75e
docs: highlight pre-requisties and bubble up related sections (#613)
b24eade
chore(security): fixed 5 vulnerabilities (#599)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
4.1.0
to 4.1.1
.This version is covered by your current version range and after updating it in your project the build failed.
concurrently is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
--prefix-length
argument through (#189)There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
I found it useful to also intercept error responses, this way the server can send down xml data e.g. for a http 401 error response, see
https://github.com/trueqbit/angular-xml/commit/73715af0efaa36f5a3cf71cf7ed825c87fdb2ca8
Just started using the new version of angular-xml in a podcast application, where response headers are usually returned as text/xml;charset=UTF-8
, but occasionally returned as application/rss+xml
by certain feeds, such as: http://wtfpod.libsyn.com/rss.
I noticed that in the angular-xml.js file, whether or not a response is XML is determined by the following function:
function responseIsXml(response) {
var contentType = response.headers('content-type'),
XML = '/xml',
minIndex = 'text/xml'.indexOf(XML);
if (contentType) {
return contentType.indexOf(XML) >= minIndex;
} else {
return false;
}
}
I've thought about making certain modifications to the functionality such as:
function responseIsXml(response) {
var contentType = response.headers('content-type');
if (contentType) {
return contentType.indexOf('xml') > -1;
} else {
return false;
}
}
but I do worry that this may result in some gotchas. Any thoughts?
Sometimes the content-type could be "text/xml".
I'm trying a single example structure (which contains $$hashKey
as added by AngularJS during edit) and x2js.json2xml_str
is producing a <$$hashKey>030</$$hashKey>
node, which then the parser chokes on.
The end effect is that x2js.json2xml(myVar)
is always null
.
I would expect an exception not a null
, but in this case I guess $-prefixed properties should simply be skipped, as they are both reserved in AngularJS and invalid XML tag names anyways.
Right now I'm doing this:
function removeDollars(obj) {
if (typeof obj != 'object')
return;
for (var k in obj) {
if (k.charAt(0) == '$')
delete obj[k];
removeDollars(obj[k]);
}
}
var data = angular.copy($scope.value);
removeDollars(data);
var xml = x2js.json2xml_str(data);
Remove .gitignore
, bower.json
and README.md
from the bower module.
1.19.0
to 1.19.1
.This version is covered by your current version range and after updating it in your project the build failed.
nodemon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 5 commits.
5124ae9
Merge branch 'master' of github.com:remy/nodemon
95fa05a
chore: git card
d84f421
chore: adding funding file
13afac2
fix: ensure signal is sent to exit event
d088cb6
chore: update stalebot
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
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.