当前位置: 首页>>代码示例>>Java>>正文


Java XMLUnit.setXpathNamespaceContext方法代码示例

本文整理汇总了Java中org.custommonkey.xmlunit.XMLUnit.setXpathNamespaceContext方法的典型用法代码示例。如果您正苦于以下问题:Java XMLUnit.setXpathNamespaceContext方法的具体用法?Java XMLUnit.setXpathNamespaceContext怎么用?Java XMLUnit.setXpathNamespaceContext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.custommonkey.xmlunit.XMLUnit的用法示例。


在下文中一共展示了XMLUnit.setXpathNamespaceContext方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUp

import org.custommonkey.xmlunit.XMLUnit; //导入方法依赖的package包/类
@Override
protected void setUp() throws Exception {
    super.setUp();
    postUrl = HTTP_BASE_URL + TEST_BASE_PATH + "/" + System.currentTimeMillis();


    Map<String,String> m = new HashMap<String,String>();
    m.put("sv", "http://www.jcp.org/jcr/sv/1.0");

    NamespaceContext ctx = new SimpleNamespaceContext(m);
    XMLUnit.setXpathNamespaceContext(ctx);


    final NameValuePairList props = new NameValuePairList();
    props.add("a", "");
    props.add("jcr:mixinTypes", "mix:referenceable");

    firstCreatedNodeUrl = testClient.createNode(postUrl + SlingPostConstants.DEFAULT_CREATE_SUFFIX, props, null, false);
    firstUuid = getProperty(firstCreatedNodeUrl, "jcr:uuid");
    firstPath = getPath(firstCreatedNodeUrl);

    secondCreatedNodeUrl = testClient.createNode(postUrl + SlingPostConstants.DEFAULT_CREATE_SUFFIX, props, null, false);
    secondUuid = getProperty(secondCreatedNodeUrl, "jcr:uuid");
    secondPath = getPath(secondCreatedNodeUrl);
}
 
开发者ID:apache,项目名称:sling-org-apache-sling-launchpad-integration-tests,代码行数:26,代码来源:ReferenceTypeHintTest.java

示例2: before

import org.custommonkey.xmlunit.XMLUnit; //导入方法依赖的package包/类
@Before
  public void before() {
    HashMap<String, String> m = new HashMap<String, String>();
    m.put("edmx", "http://schemas.microsoft.com/ado/2007/06/edmx");
    m.put("d", "http://schemas.microsoft.com/ado/2007/08/dataservices");
    m.put("m", "http://schemas.microsoft.com/ado/2007/08/dataservices/metadata");
    m.put("edm", "http://schemas.microsoft.com/ado/2009/11/edm");
//    m.put("edm", "http://schemas.microsoft.com/ado/2008/09/edm");
    m.put("annotation", "http://schemas.microsoft.com/ado/2009/02/edm/annotation");
    m.put("myns", "bla");
    m.put("myns2", "blabla");
    m.put("mynamespace", "http://tempuri.org/hello");
    SimpleNamespaceContext ctx = new SimpleNamespaceContext(m);
    XMLUnit.setXpathNamespaceContext(ctx);
    schema = EdmSchema.newBuilder().setNamespace(NAMESPACE);
    productSet = EdmEntitySet.newBuilder().setName("Products");
    categorySet = EdmEntitySet.newBuilder().setName("Categories");
    container = EdmEntityContainer.newBuilder().setName("Container");
  }
 
开发者ID:teiid,项目名称:oreva,代码行数:20,代码来源:EdmxFormatWriterTest.java

示例3: testWriteMods

import org.custommonkey.xmlunit.XMLUnit; //导入方法依赖的package包/类
@Test
public void testWriteMods() throws Exception {
    LocalStorage storage = new LocalStorage();
    LocalStorage.LocalObject local = storage.create();
    ModsStreamEditor modsEditor = new ModsStreamEditor(local);
    ModsDefinition mods = modsEditor.createPage(local.getPid(), "1", "[1]", "pageType");
    String model = "model:page";
    long timestamp = 0L;
    DcStreamEditor instance = new DcStreamEditor(local);
    instance.write(mods, model, timestamp, null);
    local.flush();

    DublinCoreRecord result = instance.read();
    assertNotNull(result);
    assertNotNull(result.getDc());
    assertEquals(local.getPid(), result.getPid());

    HashMap<String, String> namespaces = new HashMap<String, String>();
    namespaces.put("oai_dc", DcStreamEditor.DATASTREAM_FORMAT_URI);
    namespaces.put("dc", "http://purl.org/dc/elements/1.1/");
    XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(namespaces));
    String toXml = DcUtils.toXml(result.getDc(), true);
    XMLAssert.assertXpathExists("/oai_dc:dc/dc:title[text()='[1]']", toXml);
    XMLAssert.assertXpathExists("/oai_dc:dc/dc:identifier[text()='" + local.getPid() +"']", toXml);
    XMLAssert.assertXpathExists("/oai_dc:dc/dc:type[text()='" + model +"']", toXml);
}
 
开发者ID:proarc,项目名称:proarc,代码行数:27,代码来源:DcStreamEditorTest.java

示例4: testTransformation

import org.custommonkey.xmlunit.XMLUnit; //导入方法依赖的package包/类
@Test
public void testTransformation() throws Exception {
    ModsDefinition mods = ModsUtils.unmarshalModsType(new StreamSource(DcStreamEditorTest.class.getResource("periodical.xml").toExternalForm()));
    Transformer t = DcUtils.modsTransformer("model:periodical");
    JAXBSource jaxbSource = new JAXBSource(ModsUtils.defaultMarshaller(false),
            new ObjectFactory().createMods(mods));
    StringWriter dump = new StringWriter();
    t.transform(jaxbSource, new StreamResult(dump));
    String toXml = dump.toString();
    System.out.println(toXml);

    HashMap<String, String> namespaces = new HashMap<String, String>();
    namespaces.put("oai_dc", DcStreamEditor.DATASTREAM_FORMAT_URI);
    namespaces.put("dc", "http://purl.org/dc/elements/1.1/");
    XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(namespaces));
    XMLAssert.assertXpathExists("/oai_dc:dc/dc:title[text()='main']", toXml);
    XMLAssert.assertXpathExists("/oai_dc:dc/dc:title[text()='key']", toXml);
    XMLAssert.assertXpathExists("/oai_dc:dc/dc:title[text()='alternative']", toXml);
    XMLAssert.assertXpathEvaluatesTo("3", "count(/oai_dc:dc/dc:title)", toXml);
    XMLAssert.assertXpathExists("/oai_dc:dc/dc:creator[text()='Boleslav']", toXml);
    XMLAssert.assertXpathExists("/oai_dc:dc/dc:description[text()='poznámka']", toXml);
    XMLAssert.assertXpathExists("/oai_dc:dc/dc:identifier[text()='uuid:40d13cb2-811f-468c-a6d3-1ad6b01f06f7']", toXml);
    XMLAssert.assertXpathExists("/oai_dc:dc/dc:identifier[text()='isbn:0eaa6730']", toXml);
    XMLAssert.assertXpathExists("/oai_dc:dc/dc:identifier[text()='issn-l:idIssn-l']", toXml);
    XMLAssert.assertXpathExists("/oai_dc:dc/dc:identifier[text()='idWitEmptyType']", toXml);
    XMLAssert.assertXpathExists("/oai_dc:dc/dc:identifier[text()='idWithoutType']", toXml);
    // XXX needs more test
}
 
开发者ID:proarc,项目名称:proarc,代码行数:29,代码来源:DcStreamEditorTest.java

示例5: testMarcAsMods_FrequencyAuthority_Issue181

import org.custommonkey.xmlunit.XMLUnit; //导入方法依赖的package包/类
/**
     * Tests mapping of fields 310a and 008/18 to {@code [email protected]}.
     * See issue 118 and 181.
     */
    @Test
    public void testMarcAsMods_FrequencyAuthority_Issue181() throws Exception {
        InputStream xmlIS = TransformersTest.class.getResourceAsStream("frequencyAuthority.xml");
        assertNotNull(xmlIS);
        StreamSource streamSource = new StreamSource(xmlIS);
        Transformers mt = new Transformers();

        try {
            byte[] contents = mt.transformAsBytes(streamSource, Transformers.Format.MarcxmlAsMods3);
            assertNotNull(contents);
            String xmlResult = new String(contents, "UTF-8");
//            System.out.println(xmlResult);
            XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(new HashMap() {{
                put("m", ModsConstants.NS);
            }}));
            XMLAssert.assertXpathNotExists("/m:mods/m:originInfo/m:frequency[1]/@authority", xmlResult);
            XMLAssert.assertXpathEvaluatesTo("2x ročně", "/m:mods/m:originInfo/m:frequency[1]", xmlResult);
            XMLAssert.assertXpathEvaluatesTo("marcfrequency", "/m:mods/m:originInfo/m:frequency[2]/@authority", xmlResult);
            XMLAssert.assertXpathEvaluatesTo("Semiannual", "/m:mods/m:originInfo/m:frequency[2]", xmlResult);
            validateMods(new StreamSource(new ByteArrayInputStream(contents)));
        } finally {
            close(xmlIS);
        }
    }
 
开发者ID:proarc,项目名称:proarc,代码行数:29,代码来源:TransformersTest.java

示例6: testMarcAsMods_SubjectTopic_Issue185_Issue433

import org.custommonkey.xmlunit.XMLUnit; //导入方法依赖的package包/类
/**
     * Tests mapping of field 653 indicator_9 $a to {@code subject/[email protected]}.
     * See issue 185.
     * See issue 433.
     */
    @Test
    public void testMarcAsMods_SubjectTopic_Issue185_Issue433() throws Exception {
        InputStream xmlIS = TransformersTest.class.getResourceAsStream("marc_subject_65X_X9.xml");
        assertNotNull(xmlIS);
        StreamSource streamSource = new StreamSource(xmlIS);
        Transformers mt = new Transformers();

        try {
            byte[] contents = mt.transformAsBytes(streamSource, Transformers.Format.MarcxmlAsMods3);
            assertNotNull(contents);
            String xmlResult = new String(contents, "UTF-8");
//            System.out.println(xmlResult);
            XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(new HashMap() {{
                put("m", ModsConstants.NS);
            }}));
            // 653
            XMLAssert.assertXpathExists("/m:mods/m:subject[not(@authority)]/m:topic[text()='kočky' and @lang='cze']", xmlResult);
            XMLAssert.assertXpathExists("/m:mods/m:subject[not(@authority)]/m:topic[text()='cats' and @lang='eng']", xmlResult);
            XMLAssert.assertXpathNotExists("/m:mods/m:subject/m:name/m:namePart[text()='kočky']", xmlResult);
            XMLAssert.assertXpathNotExists("/m:mods/m:subject/m:name/m:namePart[text()='cats']", xmlResult);
            validateMods(new StreamSource(new ByteArrayInputStream(contents)));
        } finally {
            close(xmlIS);
        }
    }
 
开发者ID:proarc,项目名称:proarc,代码行数:31,代码来源:TransformersTest.java

示例7: testMarcAsMods_Conspectus_Issue303

import org.custommonkey.xmlunit.XMLUnit; //导入方法依赖的package包/类
/**
     * Test mapping of 072#7 $x to {@code subject/topic} and $a/$9 to {@code classification}.
     * See issue 303.
     */
    @Test
    public void testMarcAsMods_Conspectus_Issue303() throws Exception {
        InputStream xmlIS = TransformersTest.class.getResourceAsStream("marc.xml");
        assertNotNull(xmlIS);
        StreamSource streamSource = new StreamSource(xmlIS);
        Transformers mt = new Transformers();

        try {
            byte[] contents = mt.transformAsBytes(streamSource, Transformers.Format.MarcxmlAsMods3);
            assertNotNull(contents);
            String xmlResult = new String(contents, "UTF-8");
//            System.out.println(xmlResult);
            XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(new HashMap() {{
                put("m", ModsConstants.NS);
            }}));
            XMLAssert.assertXpathEvaluatesTo("Umění", "/m:mods/m:subject[@authority='Konspekt']/m:topic", xmlResult);
            XMLAssert.assertXpathEvaluatesTo("7.01/.09", "/m:mods/m:classification[@authority='udc' and @edition='Konspekt']", xmlResult);
            XMLAssert.assertXpathEvaluatesTo("21", "/m:mods/m:classification[@authority='Konspekt']", xmlResult);
            validateMods(new StreamSource(new ByteArrayInputStream(contents)));
        } finally {
            close(xmlIS);
        }
    }
 
开发者ID:proarc,项目名称:proarc,代码行数:28,代码来源:TransformersTest.java

示例8: testMarcAsMods_AbstractLang_Issue434

import org.custommonkey.xmlunit.XMLUnit; //导入方法依赖的package包/类
/**
     * Tests mapping of field 520 and subfield $9 to {@code [email protected]}.
     * See issue 434.
     */
    @Test
    public void testMarcAsMods_AbstractLang_Issue434() throws Exception {
        InputStream xmlIS = TransformersTest.class.getResourceAsStream("marc_subject_65X_X9.xml");
        assertNotNull(xmlIS);
        StreamSource streamSource = new StreamSource(xmlIS);
        Transformers mt = new Transformers();

        try {
            byte[] contents = mt.transformAsBytes(streamSource, Transformers.Format.MarcxmlAsMods3);
            assertNotNull(contents);
            String xmlResult = new String(contents, "UTF-8");
//            System.out.println(xmlResult);
            XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(new HashMap() {{
                put("m", ModsConstants.NS);
            }}));
            XMLAssert.assertXpathExists("/m:mods/m:abstract[@lang='cze' and @type='Abstract' and text()='Text cze']", xmlResult);
            XMLAssert.assertXpathExists("/m:mods/m:abstract[@lang='eng' and @type='Abstract' and text()='Text eng']", xmlResult);
            XMLAssert.assertXpathExists("/m:mods/m:abstract[not(@lang) and @type='Abstract' and text()='Text no lang']", xmlResult);
            validateMods(new StreamSource(new ByteArrayInputStream(contents)));
        } finally {
            close(xmlIS);
        }
    }
 
开发者ID:proarc,项目名称:proarc,代码行数:28,代码来源:TransformersTest.java

示例9: initializeXmlUnit

import org.custommonkey.xmlunit.XMLUnit; //导入方法依赖的package包/类
private static void initializeXmlUnit() {
  HashMap<String, String> m = new HashMap<String, String>();
  m.put("m", "http://schemas.microsoft.com/ado/2007/08/dataservices/metadata");
  m.put("d", "http://schemas.microsoft.com/ado/2007/08/dataservices");
  m.put("edmx", "http://schemas.microsoft.com/ado/2007/06/edmx");
  m.put("g", "http://www.w3.org/2005/Atom"); // 'g' is a dummy for global namespace

  NamespaceContext ctx = new SimpleNamespaceContext(m);
  XMLUnit.setXpathNamespaceContext(ctx);
  XpathEngine engine = XMLUnit.newXpathEngine();
  engine.setNamespaceContext(ctx);
}
 
开发者ID:teiid,项目名称:oreva,代码行数:13,代码来源:ServiceOperationsTest.java

示例10: testOaiResponseTransformation

import org.custommonkey.xmlunit.XMLUnit; //导入方法依赖的package包/类
@Test
public void testOaiResponseTransformation() throws Exception {
    OaiCatalog c = new OaiCatalog("", "");
    String srcUrl = OaiCatalogTest.class.getResource("oaiResponse.xml").toExternalForm();
    StreamResult result = c.transformOaiResponse(new StreamSource(srcUrl), new StreamResult(new StringWriter()));
    assertNotNull(result);

    HashMap<String, String> namespaces = new HashMap<String, String>();
    namespaces.put("marc", "http://www.loc.gov/MARC21/slim");
    XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(namespaces));
    String marc = result.getWriter().toString();
    XMLAssert.assertXpathExists("/marc:record", marc);
}
 
开发者ID:proarc,项目名称:proarc,代码行数:14,代码来源:OaiCatalogTest.java

示例11: testMarcAsMods_Issue32

import org.custommonkey.xmlunit.XMLUnit; //导入方法依赖的package包/类
/**
     * Tests mapping of 910a(sigla) as {@code <physicalLocation>} and 910b(signatura) as {@code <shelfLocator>}.
     */
    @Test
    public void testMarcAsMods_Issue32() throws Exception {
        InputStream xmlIS = TransformersTest.class.getResourceAsStream("marc.xml");
        assertNotNull(xmlIS);
        StreamSource streamSource = new StreamSource(xmlIS);
        Transformers mt = new Transformers();

        try {
            byte[] contents = mt.transformAsBytes(streamSource, Transformers.Format.MarcxmlAsMods3);
            assertNotNull(contents);
            String xmlResult = new String(contents, "UTF-8");
//            System.out.println(xmlResult);
            XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(new HashMap() {{
                put("m", ModsConstants.NS);
            }}));
            XMLAssert.assertXpathEvaluatesTo("HKA001", "/m:mods/m:location/m:physicalLocation[1]", xmlResult);
            XMLAssert.assertXpathEvaluatesTo("test sigla", "/m:mods/m:location/m:physicalLocation[2]", xmlResult);
            XMLAssert.assertXpathEvaluatesTo("2", "count(/m:mods/m:location/m:physicalLocation)", xmlResult);
            XMLAssert.assertXpathEvaluatesTo("54 487", "/m:mods/m:location/m:shelfLocator[1]", xmlResult);
            XMLAssert.assertXpathEvaluatesTo("test signatura", "/m:mods/m:location/m:shelfLocator[2]", xmlResult);
            XMLAssert.assertXpathEvaluatesTo("2", "count(/m:mods/m:location/m:shelfLocator)", xmlResult);
            validateMods(new StreamSource(new ByteArrayInputStream(contents)));
        } finally {
            close(xmlIS);
        }
    }
 
开发者ID:proarc,项目名称:proarc,代码行数:30,代码来源:TransformersTest.java

示例12: testMarcAsMods_SubjectAuthority_Issue182

import org.custommonkey.xmlunit.XMLUnit; //导入方法依赖的package包/类
/**
     * Tests mapping of fields 600, 610, 611, 630, 648, 650, 651 indicator_9 $2 to {@code [email protected]}.
     * See issue 182.
     */
    @Test
    public void testMarcAsMods_SubjectAuthority_Issue182() throws Exception {
        InputStream xmlIS = TransformersTest.class.getResourceAsStream("marc_subject_65X_X9.xml");
        assertNotNull(xmlIS);
        StreamSource streamSource = new StreamSource(xmlIS);
        Transformers mt = new Transformers();

        try {
            byte[] contents = mt.transformAsBytes(streamSource, Transformers.Format.MarcxmlAsMods3);
            assertNotNull(contents);
            String xmlResult = new String(contents, "UTF-8");
//            System.out.println(xmlResult);
            XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(new HashMap() {{
                put("m", ModsConstants.NS);
            }}));
            // 600
            XMLAssert.assertXpathExists("/m:mods/m:subject[@authority='czenas']/m:name[@type='personal']/m:namePart[text()='Novák, A. Jiří']", xmlResult);
            // 650
            XMLAssert.assertXpathExists("/m:mods/m:subject[@authority='czenas']/m:topic[text()='daňové delikty']", xmlResult);
            XMLAssert.assertXpathExists("/m:mods/m:subject[@authority='eczenas']/m:topic[text()='tax delinquency']", xmlResult);
            // 651
            XMLAssert.assertXpathExists("/m:mods/m:subject[@authority='czenas']/m:geographic[text()='Česko']", xmlResult);
            XMLAssert.assertXpathExists("/m:mods/m:subject[@authority='eczenas']/m:geographic[text()='Czechia']", xmlResult);
            validateMods(new StreamSource(new ByteArrayInputStream(contents)));
        } finally {
            close(xmlIS);
        }
    }
 
开发者ID:proarc,项目名称:proarc,代码行数:33,代码来源:TransformersTest.java

示例13: serviceDocumentAcceptHeaderInvalidCharset

import org.custommonkey.xmlunit.XMLUnit; //导入方法依赖的package包/类
@Test
public void serviceDocumentAcceptHeaderInvalidCharset() throws Exception {
  final HttpResponse response =
      callUri("", HttpHeaders.ACCEPT, HttpContentType.APPLICATION_XML + "; charset=iso-latin-1",
          HttpStatusCodes.NOT_ACCEPTABLE);
  final String body = getBody(response);
  Map<String, String> prefixMap = new HashMap<>();
  prefixMap.put("a", Edm.NAMESPACE_M_2007_08);
  XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(prefixMap));
  assertXpathExists("/a:error", body);
  assertXpathExists("/a:error/a:code", body);
  assertXpathExists("/a:error/a:message", body);
}
 
开发者ID:mibo,项目名称:janos,代码行数:14,代码来源:ServiceJsonTest.java

示例14: testMarcAsMods_RelatedItem_Issue313

import org.custommonkey.xmlunit.XMLUnit; //导入方法依赖的package包/类
/**
     * Tests mapping of field 787 to {@code relatedItem}.
     * See issue 313.
     */
    @Test
    public void testMarcAsMods_RelatedItem_Issue313() throws Exception {
        InputStream xmlIS = TransformersTest.class.getResourceAsStream("marc_relatedItem_787.xml");
        assertNotNull(xmlIS);
        StreamSource streamSource = new StreamSource(xmlIS);
        Transformers mt = new Transformers();

        try {
            byte[] contents = mt.transformAsBytes(streamSource, Transformers.Format.MarcxmlAsMods3);
            assertNotNull(contents);
            String xmlResult = new String(contents, "UTF-8");
//            System.out.println(xmlResult);
            XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(new HashMap() {{
                put("m", ModsConstants.NS);
            }}));
            // test 78708 |i Recenze na: |a Čeřovský, Jan |t Jak jsme zachraňovali svět aneb Půl století ve službách ochrany přírody |d Praha : Nakladatelství Academia, 2014 |4 kniha
            XMLAssert.assertXpathEvaluatesTo(
                    "Jak jsme zachraňovali svět aneb Půl století ve službách ochrany přírody",
                    "/m:mods/m:relatedItem[not(@type) and @displayLabel='Recenze na:']"
                    + "/m:titleInfo/m:title/text()", xmlResult);
            XMLAssert.assertXpathEvaluatesTo(
                    "Čeřovský, Jan",
                    "/m:mods/m:relatedItem[not(@type) and @displayLabel='Recenze na:']"
                    + "/m:name/m:namePart/text()", xmlResult);
            XMLAssert.assertXpathEvaluatesTo(
                    "Praha : Nakladatelství Academia, 2014",
                    "/m:mods/m:relatedItem[not(@type) and @displayLabel='Recenze na:']"
                    + "/m:originInfo/m:publisher/text()", xmlResult);
            validateMods(new StreamSource(new ByteArrayInputStream(contents)));
        } finally {
            close(xmlIS);
        }
    }
 
开发者ID:proarc,项目名称:proarc,代码行数:38,代码来源:TransformersTest.java

示例15: setXmlNamespacePrefixes

import org.custommonkey.xmlunit.XMLUnit; //导入方法依赖的package包/类
@Before
public void setXmlNamespacePrefixes() {
  Map<String, String> prefixMap = new HashMap<>();
  prefixMap.put(Edm.PREFIX_ATOM, Edm.NAMESPACE_ATOM_2005);
  prefixMap.put(Edm.PREFIX_APP, Edm.NAMESPACE_APP_2007);
  prefixMap.put(Edm.PREFIX_D, Edm.NAMESPACE_D_2007_08);
  prefixMap.put(Edm.PREFIX_M, Edm.NAMESPACE_M_2007_08);
  prefixMap.put(Edm.PREFIX_EDM, Edm.NAMESPACE_EDM_2008_09);
  prefixMap.put(Edm.PREFIX_EDMX, Edm.NAMESPACE_EDMX_2007_06);
  prefixMap.put(Edm.PREFIX_XML, Edm.NAMESPACE_XML_1998);
  XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(prefixMap));
}
 
开发者ID:mibo,项目名称:janos,代码行数:13,代码来源:AbstractRefXmlTest.java


注:本文中的org.custommonkey.xmlunit.XMLUnit.setXpathNamespaceContext方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。