web stats
Unable to access XML elements by name - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 05-05-2015, 09:31 AM
arpitgoel arpitgoel is offline
Mirth Newb
Join Date: Apr 2015
Posts: 8
arpitgoel is on a distinguished road
Default Unable to access XML elements by name

HTML Code:
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
    <title>Search results</title>
    <link href="http://localhost:5000/Patient?identifier=3333" rel="self"/>
        <name>GNU Health</name>
        <title>Patient, Demo</title>
I'm able to fetch elements using this code :
var tmp_xml = new XML(data);      //data holds xml string
for each (column in tmp_xml.children()) {
	logger.info('column: '+column.toString());
But both of these codes return empty string :
//var title = tmp_xml.title.toString());
var title = tmp_xml['title'].toString();
Reply With Quote

xml, xml child segments, xml name spaces

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 04:14 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation