Read XML file & extract attributes into variables

Read XML file & extract attributes into variables

1) I have an xml file with below content

<requestXML class="[url removed, login to view]" _list_="false"><App_ConfigureFolderRequest> <processinginstructioninfo> <user _type_="13" userId="546" userName=""/> <locale _type_="66" localeId="0"/> <formatFlags continueOnError="0" elementBased="0" filterUnInitializedFields="0" formatted="0" ignoreUnknownTags="1" skipIdToNameConversion="1" skipNameToIdConversion="0"/> </processinginstructioninfo> </App_ConfigureFolderRequest>

2) Need to remove the highlighted tag from above xml file

3) Next...need to extract all the xml attributes like "userId" value, "userName" value etc into variables

4) The xml code may change dynamically with few other attributes like "cliendID", how do I check if those attributes exists and extract into a variable.

Note: I have tried using string operations, it works fine in eclipse but it fails in my third party application that uses Java in the background. I think, we have to use XML Parsing....

Below is the code that i've used, it works in eclipse as I said above...

String content = new Scanner(new File("C:\\[url removed, login to view]")).useDelimiter("\\Z").next();

String s1 = "userId";

//[url removed, login to view](content);

int b = [url removed, login to view]("userId");

[url removed, login to view]("userId is @ "+ b);

String s2 = [url removed, login to view](b+8,b+11);

[url removed, login to view](s2);


Skills: Java, Python, XML

See more: read xml file actionscript, python read xml file sax, dom parsing read xml file vbnet, aspnet read xml file xpath, vbnet read xml file, read xml file xcode, read xml file using extjs, read xml file vbscript, read xml file java, php script read xml file, read xml file server, read xml file php, php read xml file, read xml file using net insert sql server, read xml file vbnet

About the Employer:
( 0 reviews ) India

Project ID: #16118613

Awarded to:


Hi, Dear Employer! How are you? I am really interested in your project. I have enough experience on python, C/C++, C#, java programming. I am 100% sure i can satisfy your requirements perfectly. I want a long ter More

₹2500 INR in 3 days
(85 Reviews)

9 freelancers are bidding on average ₹5880 for this job


Hi, I worked in various XML parsing event using DOM, SAX even STax. Pretty interesting event. Can we further talk? Thanks!

₹10000 INR in 3 days
(15 Reviews)

4.5 years of strong experience in analysis, design, development and implementation of enterprose solution using the technologies Java, J2EE, Spring and Hibernate. Good Experience in internet technologies like JSF/Prim More

₹3333 INR in 1 day
(1 Review)

I have related experiences on this kind of problems, and it's not a big deal for me, I can handle it in this weekend.

₹4444 INR in 1 day
(0 Reviews)

I'd love to do my best to help you

₹7777 INR in 3 days
(0 Reviews)

Hi, I am interested in your project and I would like to know more details. Kindly drop a message so we can discuss. Good luck!

₹3333 INR in 1 day
(2 Reviews)

Hi, I have 6 year exp in same. I have also worked on xml and json having good knowledge of it. worked on java technology

₹10000 INR in 2 days
(0 Reviews)

Hello, I have 10 years of Experience Android and worked on 30+ major projects.I am Interested in doing your Project. I will assure Quality in my work and good responsiveness from my side:) Android, JAVA, XML, ANDRO More

₹3333 INR in 10 days
(0 Reviews)
₹3333 INR in 1 day
(0 Reviews)