2

I have an XML file which contains employees' data.

<Employee>
  <ID>01</ID>
  <FirstName>Steven</FirstName>
  <LastName>Smith</LastName>
  <Phone>123456789</Phone> 
</Employee>    

I want to display this data in a web page using AngularJS.

From Google search I found I need to prepare a JavaScript function to read data from XML, create this JS function as ng-app, and then call this app in HTML web page to display data.

I don't know how to do this.

1

2 Answers 2

0

How to handle XML services in AngularJS?

From that Q&A, https://code.google.com/p/jquery-xml2json-plugin might be just what you're looking for.

Sign up to request clarification or add additional context in comments.

Comments

0

You need to convert XML to JSON before you can use it with AngularJS. Try this library: https://github.com/abdmob/x2js And explanations are great in this post: http://rabidgadfly.com/2013/02/angular-and-xml-no-problem/

1 Comment

Please add some more information, nut just a link on another side. It is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.