cancel
Showing results for 
Search instead for 
Did you mean: 

Read Xml File Data

Former Member
0 Kudos

hello every one,

I need to read a XML File uploaded by user and put that data of XML into Excel file.

kindly give me step wise code to achieve this.

Regards,

Deepali.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi ,

If i am unaware of the nodes and attribute present in the XML file then how is it possible to read that XML file.

i cant use

  NodeList studentList = docEle.getElementsByTagName("student");

since i don't know name of node/tag.

provide sample code.

please reply its urgent.

Qualiture
Active Contributor
0 Kudos

Of course you shouldn't use getElementsByTagName

Use something like

NodeList tstNodeList = doc.getFirstChild().getChildNodes();

then iterate through that list, and get the elementname via element.getNodeName()

and so on for each subnode

Qualiture
Active Contributor
0 Kudos

Why not simply import the XML file into an Excel workbook and do the formatting from within Excel using VBA?

Former Member
0 Kudos

hi Robin,

can u please explain me how can i achieve this in more detail..

Qualiture
Active Contributor