How to parse XML using angular js?

Is there a router JS library that can parse a different number of path levels?

  • I'm currently using http://projects.jga.me/routie to parse hash paths. However, it seems difficult to parse different number of levels. E.g. I want to be able to handle both: #/level1/ and also: #/level1/level2/ and even: #/level1/level2/level3/ and so on. Is this possible to achieve using Routie? Or are there other router libraries I may use to achieve that? Or could I make as well make it myself as a simple function implemented in the web app?

  • Answer:

    This is probably the easiest way to parse a URI, but `path` is the only thing you get. You can split that by `/` to break it into an array.  `var parts = parser.path.split('/');` https://gist.github.com/jlong/2428561

Anthony Ettinger at Quora Visit the source

Was this solution helpful to you?

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.