The issue is I have an xml embedded in the page and When I do a pagesource that xml is not present in the resultant String which I get. I am using Java with selenium webdriver 2.40. using IEDriver. I want to read the iframe middle and its content. the xml having oa:Showconsumer id and need to get the exportid and consumer id from the xml.
How can we get the xml into xml structure? Why is pagesource not fectching this details? It will be great if someone can explain how do we read the xml in this html structre. Also there are multiple frames which makes it difficult
I am posting the source
`<html>
<head>
<body style="overflow: hidden;" leftmargin="0" bottommargin="0" topmargin="0" rightmargin="0">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr style="height:43px;">
<tr style="height:25px;">
<tr>
<td colspan="2">
<iframe id="content" width="100%" scrolling="no" height="138" frameborder="0" src="content_default.html" marginheight="0" marginwidth="0" name="content">
<html>
<head><body onload="setDirtyOnChangeEvent(true);resizeContent();setHelpFile('4.htm');resizeMenuDiv();">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" bgcolor="E4DbD8">
<td rowspan="2">
<td style="width: 100%; vertical-align: top;" rowspan="2">
<iframe id="ifrm" class="rande" width="100%" scrolling="auto" height="100%" frameborder="0" src="emma_default.jsp" marginheight="0" marginwidth="0" name="ifrm">
<html>
<head>
<body onunload="onUnLoadTable();" onload="resize();setReadOnly(false);setDirtyOnChangeEvent(true);doFocus();showExtWindow();">
<form action="/emma/mmaXmlOutputDetail.do" method="post" name="xmlMessageForm">
<input type="hidden" value="" name="status">
<input type="hidden" value="" name="editId">
<input type="hidden" value="doNothing" name="task">
<input type="hidden" value="-1" name="dbKey">
<input type="hidden" value="searchXmlMessage.do?task=doBackToSearchPage&formCacheId=searchXmlMessageForm" name="cancelPath">
<input type="hidden" value="1300400" name="messageNumber">
<input type="hidden" value="" name="recordsFlag">
<input type="hidden" value="" name="xmlFlag">
<input type="hidden" value="true" name="outputXmlFlag">
<input type="hidden" value="" name="preXmlFlag">
<table class="layoutTable">
<table class="layoutTable">
<script type="text/javascript">
<span class="errorText">
<script type="text/javascript">
<input type="hidden" value="true" name="allMessages">
<input type="hidden" value="" name="searchFormCacheId">
<div id="table_div" class="content_div" style="height: 877px; overflow: auto;">
<iframe id="middle" width="100%" height="100%" frameborder="0" src="showXML.do?task=doShowOutputXml&messageNumber=1300400" marginheight="0" marginwidth="0" name="xml">
<html>
<head>
</head>
<body>
<showconsumer xsi:schemalocation="http://www.ford.com/oagis ../../../Ford/BODs/ShowConsumer.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oa="http://www.openapplications.org/oagis" xmlns="http://www.ford.com/oagis" revision="6.2" environment="Production">
</body>
<oa:applicationarea>
<oa:sender>
<oa:logicalid>Volvo</oa:logicalid>
<oa:component>CDB</oa:component>
<oa:task>ExportConsumer</oa:task>
<oa:authorizationid>CDB</oa:authorizationid>
</oa:sender>
<oa:creationdatetime>2014-04-25T12:53:49Z</oa:creationdatetime>
<oa:bodid>0A7F110A-545D-D59F-98F2-F03D98F2F03D</oa:bodid>
</oa:applicationarea>
<dataarea>
<oa:show>
<metadata>
<exportid>160574</exportid>
</metadata>
<consumer>
<consumerheader>
<source></source>
DE
<oa:documentid> </oa:documentid>
</consumerheader>
<consumerdetails category="Person">
<id type="ConsumerId">42202199</id>
<id type="GlobalConsumerId">7230010</id>
<vehiclerelation type="Drives">
<startdate>2014-04-15</startdate>
<enddate>
<changecyclemonthly>
<changecyclemileage>
</changecyclemonthly>
</enddate>
</vehiclerelation>
</consumerdetails>
</consumer>
</oa:show>
</dataarea>
</showconsumer>
</body>
</html>
</iframe>
</div>
<table>
</form>
</body>
</html>
</iframe>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</iframe>
</td>
</tr>
</tbody>
</table>
</body>
</html> `