Christian_Eiche
13 years agoOccasional Contributor
how to do an assertion on XML Start Tag of xml file
1. I am using a http request get method and getting back from our server a xml file
2. Http Response is an xml looking in viewer with raw-tab like this:
<?xml version="1.0" encoding="windows-1252"?>
<!-- This XML-document is generated by PowerParts.
It's well-formed and valid against genius_part.xsd XML Schema Definition. -->
<genius_part branch_id="" unit_type="imperial" language="GB">
<format_description major_version_number="1" minor_version_number="1" />
<geometry_2d>
<line layer="1" layer_class="0" line_style="Continuous" color_type="102" line_width="-1" rgb="0">
<start_point x="0.00000000000000" y="0.00000000000000" z="0.00000000000000"/>
<end_point x="8.00000000000000" y="0.00000000000000" z="0.00000000000000"/>
</line>
3. how is it possible to check/validate the following line of xml: <?xml version="1.0" encoding="windows-1252"?>
because I have to check if encoding is set to correct codepage of selected language.
If I try assertion <contains> does not work. Contains only works on "visible" content which I can see if I switch to view xml-tab.
Any suggestions how to solve this?
Thank's
Peter
2. Http Response is an xml looking in viewer with raw-tab like this:
<?xml version="1.0" encoding="windows-1252"?>
<!-- This XML-document is generated by PowerParts.
It's well-formed and valid against genius_part.xsd XML Schema Definition. -->
<genius_part branch_id="" unit_type="imperial" language="GB">
<format_description major_version_number="1" minor_version_number="1" />
<geometry_2d>
<line layer="1" layer_class="0" line_style="Continuous" color_type="102" line_width="-1" rgb="0">
<start_point x="0.00000000000000" y="0.00000000000000" z="0.00000000000000"/>
<end_point x="8.00000000000000" y="0.00000000000000" z="0.00000000000000"/>
</line>
3. how is it possible to check/validate the following line of xml: <?xml version="1.0" encoding="windows-1252"?>
because I have to check if encoding is set to correct codepage of selected language.
If I try assertion <contains> does not work. Contains only works on "visible" content which I can see if I switch to view xml-tab.
Any suggestions how to solve this?
Thank's
Peter