Skip to Content
Former Member
Jun 28, 2007 at 10:41 PM

XML parsing in UDF


Hi everyone!

First, I must say that I don't know anything about java/XML programming(I'm sorry)!

I'm just looking for some guiding lights for the following;

In the Message Mapping (IB), I'm trying to do a RFC Lookup to R/3 using a BAPI call. I followed Michal Krawczyk's "Mapping lookups - RFC API:


And now I need to parse the XML response and retrieve a value from it!

I would like to know if the following portion of code is ok and wheere should I put it?


DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();

// Create DOM structure

DocumentBuilder builder = factory.newDocumentBuilder();

Document document = builder.parse(content);

// Lets find my tag

NodeList list = document.getElementsByTagName("Number");

Node node = list.item(0);

if (node != null) {

node = node.getFirstChild();


if (node != null) {

tagValue = node.getNodeValue();


Thanks a lot for your help!