new to XSLT 1.0 and I really struggle with extracting the values of the following XML (using XSLT1.0):
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<smallnote xmlns="http://soap.test.com/2005/ob">
<Id>1234</Id>
<Note>
<Id>4567</Id>
<sObject xsi:type="abc:Testcase" xmlns:abc="urn:soap.test.com">
<abc:Id>890</abc:Id>
<abc:Name>Some name</abc:Name>
</sObject>
</Note>
</smallnote>
</soapenv:Body>
</soapenv:Envelope>
Desired output:
<?xml version="1.0" encoding="UTF-8"?>
<Id>1234</Id>
<NoteId>4567</NoteId>
<ObjType>Testcase</ObjType>
<ObjId>890</ObjId>
<ObjName>Some name</ObjName>
How can I deal with the namespace? I know of:
<xsl:value-of select="//*[local-name() = 'Id']" />
but it does not seem to work for me with multiple Id fields.
Is it a better approach to first remove the namespace? Because right now I struggle to select the correct "path" whenever I try to extract the values.
Thanks in advance