ref:http://msdn.microsoft.com/en-us/library/ms950779.aspx
How to use xpath to query the doc, also including namespace.
代码
<?
xml version="1.0" encoding="utf-8"
?>
<
TestSite
xmlns
="http://schemas.microsoft.com/windows/ProtocolsTest/2007/07/TestConfig"
xmlns:xsi
="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation
="http://schemas.microsoft.com/windows/ProtocolsTest/2007/07/TestConfig http://schemas.microsoft.com/windows/ProtocolsTest/2007/07/TestConfig.xsd"
>
<
Properties
>
<!--
Angelo
-->
<!--
Only Add your change list here!
-->
<
Property
name
="Path.DataSourceReference.SchemaVersion200310"
value
="Report\DataSources\DataSource\DataSourceReference"
/>
<
Property
name
="Path.DataSets.SchemaVersion200310"
value
="Report\DataSets"
/>
<
Property
name
="Path.DataSet.SchemaVersion200310"
value
="Report\DataSets\DataSet"
/>
<
Property
name
="Path.Fields.SchemaVersion200310"
value
="Report\DataSets\DataSet\Fields"
/>
<
Property
name
="Path.Field.SchemaVersion200310"
value
="Report\DataSets\DataSet\Fields\Field"
/>
<
Property
name
="Path.DataField.SchemaVersion200310"
value
="Report\DataSets\DataSet\Fields\Field\DataField"
/>
<
Property
name
="Path.Value.SchemaVersion200310"
value
="Report\DataSets\DataSet\Fields\Field\Value"
/>
<
Property
name
="Path.Query.SchemaVersion200310"
value
="Report\DataSets\DataSet\Query"
/>
<
Property
name
="Path.DataSourceName.SchemaVersion200310"
value
="Report\DataSets\DataSet\Query\DataSourceName"
/>
<
Property
name
="Path.CommandType.SchemaVersion200310"
value
="Report\DataSets\DataSet\Query\CommandType"
/>
<
Property
name
="Path.CommandText.SchemaVersion200310"
value
="Report\DataSets\DataSet\Query\CommandText"
/>
<
Property
name
="Path.QueryParameters.SchemaVersion200310"
value
="Report\DataSets\DataSet\Query\QueryParameters"
/>
<
Property
name
="Path.QueryParameter.SchemaVersion200310"
value
="Report\DataSets\DataSet\Query\QueryParameters\QueryParameter"
/>
<
Property
name
="Path.Timeout.SchemaVersion200310"
value
="Report\DataSets\DataSet\Query\Timeout"
/>
<
Property
name
="Path.CaseSensitivity.SchemaVersion200310"
value
="Report\DataSets\DataSet\CaseSensitivity"
/>
<
Property
name
="Path.Collation.SchemaVersion200310"
value
="Report\DataSets\DataSet\Collation"
/>
<
Property
name
="Path.AccentSensitivity.SchemaVersion200310"
value
="Report\DataSets\DataSet\AccentSensitivity"
/>
<
Property
name
="Path.KanatypeSensitivity.SchemaVersion200310"
value
="Report\DataSets\DataSet\KanatypeSensitivity"
/>
<
Property
name
="Path.WidthSensitivity.SchemaVersion200310"
value
="Report\DataSets\DataSet\WidthSensitivity"
/>
<
Property
name
="Path.Filters.SchemaVersion200310"
value
="Report\DataSets\DataSet\Filters"
/>
<
Property
name
="Path.Filter.SchemaVersion200310"
value
="Report\DataSets\DataSet\Filters\Filter"
/>
<
Property
name
="Path.FilterExpression.SchemaVersion200310"
value
="Report\DataSets\DataSet\Filters\Filter\FilterExpression"
/>
<
Property
name
="Path.Operator.SchemaVersion200310"
value
="Report\DataSets\DataSet\Filters\Filter\Operator"
/>
<
Property
name
="Path.FilterValues.SchemaVersion200310"
value
="Report\DataSets\DataSet\Filters\Filter\FilterValues"
/>
<
Property
name
="Path.FilterValue.SchemaVersion200310"
value
="Report\DataSets\DataSet\Filters\Filter\FilterValues\FilterValue"
/>
<
Property
name
="Path.Body.SchemaVersion200310"
value
="Report\Body"
/>
<
Property
name
="Path.ReportItems.SchemaVersion200310"
value
="Report\Body\ReportItems"
/>
<
Property
name
="Path.Line.SchemaVersion200310"
value
="Report\Body\ReportItems\Line"
/>
<
Property
name
="Path.Style.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style"
/>
<
Property
name
="Path.BorderColor.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\BorderColor"
/>
<
Property
name
="Path.Default.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\BorderColor\Default"
/>
<
Property
name
="Path.Left.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\BorderColor\Left"
/>
<
Property
name
="Path.Right.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\BorderColor\Right"
/>
<
Property
name
="Path.Top.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\BorderColor\Top"
/>
<
Property
name
="Path.Bottom.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\BorderColor\Bottom"
/>
<
Property
name
="Path.BorderStyle.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\BorderStyle"
/>
<
Property
name
="Path.BorderWidth.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\BorderWidth"
/>
<
Property
name
="Path.BackgroundColor.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\BackgroundColor"
/>
<
Property
name
="Path.BackgroundGradientType.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\BackgroundGradientType"
/>
<
Property
name
="Path.BackgroundGradientEndColor.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\BackgroundGradientEndColor"
/>
<
Property
name
="Path.BackgroundImage.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\BackgroundImage"
/>
<
Property
name
="Path.Source.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\BackgroundImage\Source"
/>
<
Property
name
="Path.MIMEType.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\BackgroundImage\MIMEType"
/>
<
Property
name
="Path.BackgroundRepeat.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\BackgroundImage\BackgroundRepeat"
/>
<
Property
name
="Path.FontStyle.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\FontStyle"
/>
<
Property
name
="Path.FontFamily.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\FontFamily"
/>
<
Property
name
="Path.FontSize.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\FontSize"
/>
<
Property
name
="Path.FontWeight.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\FontWeight"
/>
<
Property
name
="Path.Format.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\Format"
/>
<
Property
name
="Path.TextDecoration.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\TextDecoration"
/>
<
Property
name
="Path.TextAlign.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\TextAlign"
/>
<
Property
name
="Path.VerticalAlign.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\VerticalAlign"
/>
<
Property
name
="Path.Color.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\Color"
/>
<
Property
name
="Path.PaddingLeft.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\PaddingLeft"
/>
<
Property
name
="Path.PaddingRight.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\PaddingRight"
/>
<
Property
name
="Path.PaddingTop.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\PaddingTop"
/>
<
Property
name
="Path.PaddingBottom.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\PaddingBottom"
/>
<
Property
name
="Path.LineHeight.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\LineHeight"
/>
<
Property
name
="Path.Direction.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\Direction"
/>
<
Property
name
="Path.WritingMode.SchemaVersion200310"
value
="Report\Body\ReportItems\Line\Style\WritingMode"
/>
</
Properties
>
</
TestSite
>
Always failed when there the namespace existing.