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);


Habilidades: Java, Python, XML

Ver más: how to read attribute value from xml file in c#, python xml get attribute value, get xml attribute value c# xdocument, get xml node attribute value c#, how to get attribute value in xml using c# linq, python elementtree get attribute value, python xml find element with attribute value, python read xml file example, 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

Información del empleador:
( 1 comentario ) Hyderabad, India

Nº del proyecto: #16118613

Adjudicado a:


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 Más

₹2500 INR en 3 días
(96 comentarios)

8 freelancers están ofertando el promedio de ₹5590 para este trabajo


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

₹10000 INR en 3 días
(18 comentarios)

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 Más

₹3333 INR en 1 día
(1 comentario)

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 Más

₹3333 INR en 10 días
(1 comentario)

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 en 1 día
(0 comentarios)

I'd love to do my best to help you

₹7777 INR en 3 días
(0 comentarios)

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 en 2 días
(0 comentarios)
₹3333 INR en 1 día
(0 comentarios)