亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? dommemtest.cpp

?? IBM的解析xml的工具Xerces的源代碼
?? CPP
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
/* * Copyright 2002,2004 The Apache Software Foundation. *  * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at *  *      http://www.apache.org/licenses/LICENSE-2.0 *  * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */////  Various DOM tests.//     This is NOT a complete test of DOM functionality.///* * $Id: DOMMemTest.cpp,v 1.43 2004/09/08 13:57:02 peiyongz Exp $ */#include <stdio.h>#include <string.h>#include <xercesc/dom/DOM.hpp>#include <xercesc/util/PlatformUtils.hpp>#include <xercesc/util/XMLException.hpp>#include <xercesc/util/XMLString.hpp>#include <xercesc/util/XMLUniDefs.hpp>XERCES_CPP_NAMESPACE_USEbool errorOccurred = false;#define TASSERT(c) tassert((c), __FILE__, __LINE__)void tassert(bool c, const char *file, int line){    if (!c) {        printf("Failure.  Line %d,   file %s\n", line, file);        errorOccurred = true;    }};#define EXCEPTION_TEST(operation, expected_exception)               \{                                                                   \    try {                                                           \    operation;                                                      \    printf(" Error: no exception thrown at line %d\n", __LINE__);   \    errorOccurred = true;                                           \    }                                                               \    catch (DOMException &e) {                                       \    if (e.code != expected_exception) {                             \        printf(" Wrong exception code: %d at line %d\n", e.code, __LINE__); \        errorOccurred = true;                                       \    }                                                               \    }                                                               \    catch (...)   {                                                 \        printf(" Wrong exception thrown at line %d\n", __LINE__);   \        errorOccurred = true;                                       \    }                                                               \}// ---------------------------------------------------------------------------//  This is a simple class that lets us do easy (though not terribly efficient)//  trancoding of char* data to XMLCh data.// ---------------------------------------------------------------------------class XStr{public :    // -----------------------------------------------------------------------    //  Constructors and Destructor    // -----------------------------------------------------------------------    XStr(const char* const toTranscode)    {        // Call the private transcoding method        fUnicodeForm = XMLString::transcode(toTranscode);    }    ~XStr()    {        XMLString::release(&fUnicodeForm);    }    // -----------------------------------------------------------------------    //  Getter methods    // -----------------------------------------------------------------------    const XMLCh* unicodeForm() const    {        return fUnicodeForm;    }private :    // -----------------------------------------------------------------------    //  Private data members    //    //  fUnicodeForm    //      This is the Unicode XMLCh format of the string.    // -----------------------------------------------------------------------    XMLCh*   fUnicodeForm;};#define X(str) XStr(str).unicodeForm()//---------------------------------------------------------------------------------------////   DOMBasicTests    Basic DOM Level 1 tests////---------------------------------------------------------------------------------------void DOMBasicTests(){    //    //  Test Doc01      Create a new empty document    //    {        //  First precondition, so that lazily created strings do not appear        //  as memory leaks.        DOMDocument*   doc;        doc = DOMImplementationRegistry::getDOMImplementation(X("Core"))->createDocument();        doc->release();    }    //    //  Test Doc02      Create one of each kind of node using the    //                  document createXXX methods.    //                  Watch for memory leaks.    //    {        //  Do all operations in a preconditioning step, to force the        //  creation of implementation objects that are set up on first use.        //  Don't watch for leaks in this block (no  / )        DOMDocument* doc = DOMImplementationRegistry::getDOMImplementation(X("Core"))->createDocument();        DOMElement*   el = doc->createElement(X("Doc02Element"));        DOMDocumentFragment* frag = doc->createDocumentFragment ();        DOMText*  text = doc->createTextNode(X("Doc02TextNode"));        DOMComment* comment = doc->createComment(X("Doc02Comment"));        DOMCDATASection*  cdataSec = doc->createCDATASection(X("Doc02CDataSection"));        DOMDocumentType*  docType = doc->createDocumentType(X("Doc02DocumentType"));        DOMNotation* notation = doc->createNotation(X("Doc02Notation"));        DOMProcessingInstruction* pi = doc->createProcessingInstruction(X("Doc02PITarget"), X("Doc02PIData"));        DOMNodeList*    nodeList = doc->getElementsByTagName(X("*"));        doc->release();    }    //    //  Doc03 - Create a small document tree    //    {        DOMDocument*   doc = DOMImplementationRegistry::getDOMImplementation(X("Core"))->createDocument();        DOMElement*   rootEl = doc->createElement(X("Doc03RootElement"));        doc->appendChild(rootEl);        DOMText*       textNode = doc->createTextNode(X("Doc03 text stuff"));        rootEl->appendChild(textNode);        DOMNodeList*    nodeList = doc->getElementsByTagName(X("*"));        doc->release();    };    //    //  Attr01    //    {        DOMDocument*   doc = DOMImplementationRegistry::getDOMImplementation(X("Core"))->createDocument();        DOMElement*   rootEl  = doc->createElement(X("RootElement"));        doc->appendChild(rootEl);        {            DOMAttr*        attr01  = doc->createAttribute(X("Attr01"));            DOMNode* rem = rootEl->setAttributeNode(attr01);            if (rem)                rem->release();        }        {            DOMAttr* attr02 = doc->createAttribute(X("Attr01"));            DOMNode* rem = rootEl->setAttributeNode(attr02);            if (rem)                rem->release();        }        doc->release();    };    //    //  Attr02    //    {        DOMDocument*   doc = DOMImplementationRegistry::getDOMImplementation(X("Core"))->createDocument();        DOMElement*   rootEl  = doc->createElement(X("RootElement"));        doc->appendChild(rootEl);        DOMAttr*        attr01  = doc->createAttribute(X("Attr02"));        DOMNode* rem = rootEl->setAttributeNode(attr01);        if (rem)            rem->release();        DOMAttr*        attr02 = doc->createAttribute(X("Attr02"));        rem = rootEl->setAttributeNode(attr02);        if (rem)            rem->release();        doc->release();    }    //    //  Attr03    //    {        DOMDocument*   doc = DOMImplementationRegistry::getDOMImplementation(X("Core"))->createDocument();        DOMElement*   rootEl  = doc->createElement(X("RootElement"));        doc->appendChild(rootEl);        DOMAttr*        attr01  = doc->createAttribute(X("Attr03"));        DOMNode* rem = rootEl->setAttributeNode(attr01);        if (rem)            rem->release();        attr01->setValue(X("Attr03Value1"));        attr01->setValue(X("Attr03Value2"));        doc->release();    }    //    //  Attr04    //    {        DOMDocument*   doc = DOMImplementationRegistry::getDOMImplementation(X("Core"))->createDocument();        DOMElement*   rootEl  = doc->createElement(X("RootElement"));        doc->appendChild(rootEl);        DOMAttr*        attr01  = doc->createAttribute(X("Attr04"));        DOMNode* rem = rootEl->setAttributeNode(attr01);        if (rem)            rem->release();        attr01->setValue(X("Attr04Value1"));        DOMNode* value = attr01->getFirstChild();        doc->release();    }    //    //  Text01    //    {        DOMDocument*   doc = DOMImplementationRegistry::getDOMImplementation(X("Core"))->createDocument();        DOMElement*   rootEl  = doc->createElement(X("RootElement"));        doc->appendChild(rootEl);        DOMText*        txt1 = doc->createTextNode(X("Hello Goodbye"));        rootEl->appendChild(txt1);        txt1->splitText(6);        rootEl->normalize();        doc->release();    }    //    //  Notation01    //    {        DOMDocument*       doc = DOMImplementationRegistry::getDOMImplementation(X("Core"))->createDocument();        DOMDocumentType*   dt  = doc->createDocumentType(X("DocType_for_Notation01"));        doc->appendChild(dt);        DOMNamedNodeMap* notationMap = dt->getNotations();        DOMNotation*    nt1 = doc->createNotation(X("Notation01"));        DOMNode* rem = notationMap->setNamedItem (nt1);        if (rem)            rem->release();        DOMNode*  abc1 = notationMap->getNamedItem(X("Notation01"));        DOMNotation*    nt2 = (DOMNotation*) abc1;        TASSERT(nt1==nt2);        nt2 = 0;        nt1 = 0;        DOMNode* abc6 = notationMap->getNamedItem(X("Notation01"));        nt2 = (DOMNotation*) abc6;        doc->release();    }    //    //  NamedNodeMap01 - comparison operators.    //    {        DOMNamedNodeMap*    nnm = 0;        TASSERT(nnm == 0);        DOMDocument*       doc = DOMImplementationRegistry::getDOMImplementation(X("Core"))->createDocument();        nnm = doc->getAttributes();    // Should be null, because node type                                      //   is not Element.        TASSERT(nnm == 0);        TASSERT(!(nnm != 0));        DOMElement* el = doc->createElement(X("NamedNodeMap01"));        DOMNamedNodeMap* nnm2 = el->getAttributes();    // Should be an empty, but non-null map.        TASSERT(nnm2 != 0);        TASSERT(nnm != nnm2);        nnm = nnm2;        TASSERT(nnm == nnm2);        doc->release();    }

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧洲精品中文字幕| 国产欧美一区二区三区在线老狼| 国产精品一区二区久激情瑜伽| 亚洲精选免费视频| 国产毛片精品国产一区二区三区| 亚洲视频1区2区| 91精品视频网| 国产成人精品一区二区三区网站观看| 亚洲在线视频一区| 精品久久久久久久一区二区蜜臀| 成人av资源网站| 亚洲一区免费视频| 欧美xfplay| 欧洲精品中文字幕| 国产成人超碰人人澡人人澡| 亚洲国产中文字幕| 国产色产综合色产在线视频| 欧美日韩成人一区二区| 成人久久视频在线观看| 蜜桃在线一区二区三区| 亚洲欧洲一区二区在线播放| 欧美日韩高清不卡| 国内精品免费在线观看| 亚洲一区二区在线观看视频| 69成人精品免费视频| 不卡一区在线观看| 久久成人免费日本黄色| 亚洲国产成人porn| 中文字幕av资源一区| 欧美成人激情免费网| 欧美性大战久久久久久久蜜臀 | 国产91精品精华液一区二区三区| 国产精品综合网| 亚洲大片一区二区三区| 中文字幕一区二区日韩精品绯色| 精品国产伦理网| 91福利国产成人精品照片| 欧美私人免费视频| 国产资源在线一区| 精品成人a区在线观看| 日本欧美加勒比视频| 99国产精品国产精品久久| 18欧美乱大交hd1984| 色哟哟一区二区| 视频一区二区国产| 中文字幕欧美三区| 91精品国产色综合久久不卡蜜臀| 中文幕一区二区三区久久蜜桃| 日韩一级二级三级| 欧美午夜精品一区二区三区| 91视视频在线观看入口直接观看www| 国产精品中文字幕一区二区三区| av中文一区二区三区| 久久er99精品| 毛片一区二区三区| 美脚の诱脚舐め脚责91| 日产欧产美韩系列久久99| 亚洲bt欧美bt精品777| 亚洲综合偷拍欧美一区色| 亚洲精品免费看| 亚洲精品日日夜夜| 亚洲一区二区三区不卡国产欧美| 国产精品人成在线观看免费| 国产精品美女久久久久久2018 | 91丨九色丨蝌蚪富婆spa| 成人午夜在线播放| www.av精品| 99riav久久精品riav| 99re亚洲国产精品| 成人一级黄色片| 成人精品小蝌蚪| 一本大道久久a久久精二百| 成人黄色大片在线观看| 91日韩一区二区三区| 91搞黄在线观看| 欧美裸体bbwbbwbbw| 日韩视频一区二区三区在线播放 | 亚洲精品中文字幕在线观看| 亚洲国产精品久久人人爱蜜臀 | 蜜桃视频在线观看一区| 久久精品av麻豆的观看方式| 国产乱子伦一区二区三区国色天香| 国产精品香蕉一区二区三区| 波多野结衣在线aⅴ中文字幕不卡| 国产一区二区三区美女| 成人动漫一区二区在线| 欧美色综合影院| 欧美一区二区三区在线观看视频| 2020国产精品自拍| 亚洲丝袜另类动漫二区| 欧美久久久久免费| 久久看人人爽人人| 粉嫩绯色av一区二区在线观看| 久久国产精品99久久久久久老狼| 丁香网亚洲国际| 91精品欧美综合在线观看最新| 日韩精品欧美精品| 国产盗摄精品一区二区三区在线| 91理论电影在线观看| 欧美videofree性高清杂交| 综合欧美一区二区三区| 成人午夜私人影院| 欧美日韩一区二区电影| 久久久噜噜噜久噜久久综合| 亚洲福利一二三区| a亚洲天堂av| 久久午夜羞羞影院免费观看| 亚洲国产日韩在线一区模特| a在线欧美一区| 精品国产三级电影在线观看| 亚洲777理论| 91丨porny丨蝌蚪视频| 久久精品亚洲麻豆av一区二区| 日韩 欧美一区二区三区| 欧美午夜一区二区三区免费大片| 国产精品黄色在线观看| 国产一区二区三区日韩 | 国产成人精品一区二区三区网站观看| 在线播放欧美女士性生活| 亚洲免费观看在线观看| 成人免费视频视频在线观看免费| 日韩欧美资源站| 日韩黄色在线观看| 欧美日韩三级一区| 一卡二卡三卡日韩欧美| 91亚洲精华国产精华精华液| 欧美国产乱子伦 | 99精品久久久久久| 中文天堂在线一区| 风间由美一区二区三区在线观看| 精品久久久网站| 亚洲成人av中文| 欧美亚洲一区二区在线观看| 一区二区三区中文在线观看| 色欧美88888久久久久久影院| 国产精品国产精品国产专区不片| 国产成人精品亚洲午夜麻豆| 国产午夜精品久久久久久免费视| 久久99国产精品久久99| 久久这里只有精品视频网| 韩国三级在线一区| 久久蜜桃香蕉精品一区二区三区| 精品在线观看免费| 精品国产a毛片| 国产成人av资源| 一区在线观看视频| 一本一道久久a久久精品| 亚洲综合色丁香婷婷六月图片| 91农村精品一区二区在线| 亚洲免费大片在线观看| 欧美色图片你懂的| 日韩高清不卡一区二区三区| 欧美成人女星排行榜| 国产不卡在线视频| 亚洲欧美日韩国产一区二区三区 | 日韩欧美不卡在线观看视频| 成人丝袜18视频在线观看| 丝袜美腿亚洲色图| 亚洲精品久久久蜜桃| 国产亚洲欧美中文| 91精品国产91久久久久久最新毛片 | 日韩av中文字幕一区二区| 18成人在线观看| 亚洲欧美国产77777| 在线欧美日韩精品| 日韩精品1区2区3区| 久久久久久97三级| 99re在线精品| 天天av天天翘天天综合网| 日韩美女视频一区二区在线观看| 国产一区二区三区精品欧美日韩一区二区三区| 久久久.com| 色综合久久综合| 日韩中文字幕区一区有砖一区 | 免费人成精品欧美精品| 精品国产91亚洲一区二区三区婷婷| 国产成人在线色| 亚洲精品久久久久久国产精华液| 欧美视频在线不卡| 狠狠色丁香久久婷婷综合_中| 国产欧美日韩不卡免费| 色婷婷av久久久久久久| 蜜桃视频在线一区| 中文字幕一区av| 日韩色在线观看| www.亚洲精品| 免费成人在线观看视频| 国产精品丝袜久久久久久app| 欧美日韩一级片网站| 国产 日韩 欧美大片| 日日夜夜免费精品| 国产精品久久久久aaaa樱花 | 亚洲一区二区三区视频在线播放 | 亚洲精品日产精品乱码不卡| 精品播放一区二区| 欧美少妇xxx| eeuss鲁一区二区三区| 久久国产生活片100| 一区二区三区视频在线看| 国产无人区一区二区三区|