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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? xmlurl.cpp

?? IBM的解析xml的工具Xerces的源代碼
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
	//  parse the base URL string and conglomerate them.	//	if (isRelative() && baseURL)	{		if (*baseURL)		{			XMLURL basePart(baseURL, fMemoryManager);			if (!conglomerateWithBase(basePart, false))			{				cleanup();				ThrowXMLwithMemMgr(MalformedURLException, XMLExcepts::URL_RelativeBaseURL, fMemoryManager);			}		}	}}// this version of setURL doesn't throw a malformedurl exception// instead it returns false when it failed (or when it would of// thrown a malformedurl exception)bool XMLURL::setURL(const XMLCh* const    baseURL                  , const XMLCh* const    relativeURL                  , XMLURL& xmlURL){    cleanup();    // Parse our URL string    if (parse(relativeURL, xmlURL))    {	    //  If its relative and the base is non-null and non-empty, then	    //  parse the base URL string and conglomerate them.	    //	    if (isRelative() && baseURL && *baseURL)	    {		   	        XMLURL basePart(fMemoryManager);            if (parse(baseURL, basePart)  && conglomerateWithBase(basePart, false))            {    		        return true;			                    		    }	    }        else            return true;    }    return false;}void XMLURL::setURL(const XMLURL&         baseURL                  , const XMLCh* const    relativeURL){    cleanup();	// Parse our URL string    parse(relativeURL);    // If its relative, then conglomerate with the base URL    if (isRelative())		conglomerateWithBase(baseURL);}// ---------------------------------------------------------------------------//  XMLURL: Miscellaneous methods// ---------------------------------------------------------------------------bool XMLURL::isRelative() const{    // If no protocol then relative    if (fProtocol == Unknown)        return true;    // If no path, or the path is not absolute, then relative    if (!fPath)        return true;    if (*fPath != chForwardSlash)        return true;    return false;}bool XMLURL::hasInvalidChar() const {    return fHasInvalidChar;}BinInputStream* XMLURL::makeNewStream() const{    //    //  If its a local host, then we short circuit it and use our own file    //  stream support. Otherwise, we just let it fall through and let the    //  installed network access object provide a stream.    //    if (fProtocol == XMLURL::File)    {        if (!fHost || !XMLString::compareIString(fHost, XMLUni::fgLocalHostString))        {            XMLCh* realPath = XMLString::replicate(fPath, fMemoryManager);            ArrayJanitor<XMLCh> basePathName(realPath, fMemoryManager);            //            // Need to manually replace any character reference %xx first            // HTTP protocol will be done automatically by the netaccessor            //            int end = XMLString::stringLen(realPath);            int percentIndex = XMLString::indexOf(realPath, chPercent, 0, fMemoryManager);            while (percentIndex != -1) {                if (percentIndex+2 >= end ||                    !isHexDigit(realPath[percentIndex+1]) ||                    !isHexDigit(realPath[percentIndex+2]))                {                    XMLCh value1[4];                    XMLString::moveChars(value1, &(realPath[percentIndex]), 3);                    value1[3] = chNull;                    ThrowXMLwithMemMgr2(MalformedURLException                            , XMLExcepts::XMLNUM_URI_Component_Invalid_EscapeSequence                            , realPath                            , value1                            , fMemoryManager);                }                unsigned int value = (xlatHexDigit(realPath[percentIndex+1]) * 16) + xlatHexDigit(realPath[percentIndex+2]);                realPath[percentIndex] = XMLCh(value);                int i =0;                for (i = percentIndex + 1; i < end - 2 ; i++)                    realPath[i] = realPath[i+2];                realPath[i] = chNull;                end = i;                percentIndex = XMLString::indexOf(realPath, chPercent, percentIndex, fMemoryManager);            }            BinFileInputStream* retStrm = new (fMemoryManager) BinFileInputStream(realPath);            if (!retStrm->getIsOpen())            {                delete retStrm;                return 0;            }            return retStrm;        }    }    //    //  If we don't have have an installed net accessor object, then we    //  have to just throw here.    //    if (!XMLPlatformUtils::fgNetAccessor)        ThrowXMLwithMemMgr(MalformedURLException, XMLExcepts::URL_UnsupportedProto, fMemoryManager);    // Else ask the net accessor to create the stream    return XMLPlatformUtils::fgNetAccessor->makeNew(*this);}void XMLURL::makeRelativeTo(const XMLCh* const baseURLText){    // If this one is not relative, don't bother    if (!isRelative())        return;    XMLURL baseURL(baseURLText, fMemoryManager);    conglomerateWithBase(baseURL);}void XMLURL::makeRelativeTo(const XMLURL& baseURL){    // If this one is not relative, don't bother    if (!isRelative())        return;    conglomerateWithBase(baseURL);}// ---------------------------------------------------------------------------//  XMLURL: Private helper methods// ---------------------------------------------------------------------------////  This method will take the broken out parts of the URL and build up the//  full text. We don't do this unless someone asks us to, since its often//  never required.//void XMLURL::buildFullText(){    // Calculate the worst case size of the buffer required    unsigned int bufSize = gMaxProtoLen + 1                           + XMLString::stringLen(fFragment) + 1                           + XMLString::stringLen(fHost) + 2                           + XMLString::stringLen(fPassword) + 1                           + XMLString::stringLen(fPath)                           + XMLString::stringLen(fQuery) + 1                           + XMLString::stringLen(fUser) + 1                           + 32;    // Clean up the existing buffer and allocate another    fMemoryManager->deallocate(fURLText);//delete [] fURLText;    fURLText = (XMLCh*) fMemoryManager->allocate((bufSize) * sizeof(XMLCh));//new XMLCh[bufSize];    *fURLText = 0;    XMLCh* outPtr = fURLText;    if (fProtocol != Unknown)    {        XMLString::catString(fURLText, getProtocolName());        outPtr += XMLString::stringLen(fURLText);        *outPtr++ = chColon;        *outPtr++ = chForwardSlash;        *outPtr++ = chForwardSlash;    }    if (fUser)    {        XMLString::copyString(outPtr, fUser);        outPtr += XMLString::stringLen(fUser);        if (fPassword)        {            *outPtr++ = chColon;            XMLString::copyString(outPtr, fPassword);            outPtr += XMLString::stringLen(fPassword);        }        *outPtr++ = chAt;    }    if (fHost)    {        XMLString::copyString(outPtr, fHost);        outPtr += XMLString::stringLen(fHost);        //        //  If the port is zero, then we don't put it in. Else we need        //  to because it was explicitly provided.        //        if (fPortNum)        {            *outPtr++ = chColon;            XMLCh tmpBuf[17];            XMLString::binToText(fPortNum, tmpBuf, 16, 10, fMemoryManager);            XMLString::copyString(outPtr, tmpBuf);            outPtr += XMLString::stringLen(tmpBuf);        }    }    if (fPath)    {        XMLString::copyString(outPtr, fPath);        outPtr += XMLString::stringLen(fPath);    }    if (fQuery)    {        *outPtr++ = chQuestion;        XMLString::copyString(outPtr, fQuery);        outPtr += XMLString::stringLen(fQuery);    }    if (fFragment)    {        *outPtr++ = chPound;        XMLString::copyString(outPtr, fFragment);        outPtr += XMLString::stringLen(fFragment);    }    // Cap it off in case the last op was not a string copy    *outPtr = 0;}////  Just a central place to handle cleanup, since its done from a number//  of different spots.//void XMLURL::cleanup(){    fMemoryManager->deallocate(fFragment);//delete [] fFragment;    fMemoryManager->deallocate(fHost);//delete [] fHost;    fMemoryManager->deallocate(fPassword);//delete [] fPassword;    fMemoryManager->deallocate(fPath);//delete [] fPath;    fMemoryManager->deallocate(fQuery);//delete [] fQuery;    fMemoryManager->deallocate(fUser);//delete [] fUser;    fMemoryManager->deallocate(fURLText);//delete [] fURLText;    fFragment = 0;    fHost = 0;    fPassword = 0;    fPath = 0;    fQuery = 0;    fUser = 0;    fURLText = 0;    fProtocol = Unknown;    fPortNum = 0;    fHasInvalidChar = false;}//This function  has been modified to take a bool parameter and the//functionality inside looks irrational but is only to make//solaris 2.7 CC 5.0 optimized build happy.bool XMLURL::conglomerateWithBase(const XMLURL& baseURL, bool useExceptions){    // The base URL cannot be relative    if (baseURL.isRelative())    {        if (useExceptions)			ThrowXMLwithMemMgr(MalformedURLException, XMLExcepts::URL_RelativeBaseURL, fMemoryManager);        else            return false;    }    //    //  Check a special case. If all we have is a fragment, then we want    //  to just take the base host and path, plus our fragment.    //    if ((fProtocol == Unknown)    &&  !fHost    &&  !fPath    &&  fFragment)    {        // Just in case, make sure we don't leak the user or password values        fMemoryManager->deallocate(fUser);//delete [] fUser;        fUser = 0;        fMemoryManager->deallocate(fPassword);//delete [] fPassword;        fPassword = 0;        // Copy over the protocol and port number as is        fProtocol = baseURL.fProtocol;        fPortNum = baseURL.fPortNum;        // Replicate the base fields that are provided        fHost = XMLString::replicate(baseURL.fHost, fMemoryManager);        fUser = XMLString::replicate(baseURL.fUser, fMemoryManager);        fPassword = XMLString::replicate(baseURL.fPassword, fMemoryManager);        fPath = XMLString::replicate(baseURL.fPath, fMemoryManager);        return true;    }    //    //  All we have to do is run up through our fields and, for each one    //  that we don't have, use the based URL's. Once we hit one field    //  that we have, we stop.    //    if (fProtocol != Unknown)        return true;    fProtocol = baseURL.fProtocol;    //    //  If the protocol is not file, and we either already have our own    //  host, or the base does not have one, then we are done.    //    if (fProtocol != File)    {        if (fHost || !baseURL.fHost)            return true;    }    // Replicate all of the hosty stuff if the base has one    if (baseURL.fHost)    {        // Just in case, make sure we don't leak a user or password field        fMemoryManager->deallocate(fUser);//delete [] fUser;        fUser = 0;        fMemoryManager->deallocate(fPassword);//delete [] fPassword;        fPassword = 0;        fMemoryManager->deallocate(fHost);//delete [] fHost;        fHost = 0;        fHost = XMLString::replicate(baseURL.fHost, fMemoryManager);        fUser = XMLString::replicate(baseURL.fUser, fMemoryManager);        fPassword = XMLString::replicate(baseURL.fPassword, fMemoryManager);        fPortNum = baseURL.fPortNum;    }    // If we have a path and its absolute, then we are done    const bool hadPath = (fPath != 0);    if (hadPath)    {        if (*fPath == chForwardSlash)            return true;    }    // Its a relative path, so weave them together.    if (baseURL.fPath) {        XMLCh* temp = XMLPlatformUtils::weavePaths(baseURL.fPath, fPath ,fMemoryManager);        fMemoryManager->deallocate(fPath);//delete [] fPath;        fPath = temp;    }    // If we had any original path, then we are done    if (hadPath)        return true;    // We had no original path, so go on to deal with the query/fragment parts    if (fQuery || !baseURL.fQuery)        return true;    fQuery = XMLString::replicate(baseURL.fQuery, fMemoryManager);    if (fFragment || !baseURL.fFragment)        return true;    fFragment = XMLString::replicate(baseURL.fFragment, fMemoryManager);	return true;}void XMLURL::parse(const XMLCh* const urlText){    // Simplify things by checking for the psycho scenarios first    if (!*urlText)        ThrowXMLwithMemMgr(MalformedURLException, XMLExcepts::URL_NoProtocolPresent, fMemoryManager);    // Before we start, check if this urlText contains valid uri characters    if (!XMLUri::isURIString(urlText))        fHasInvalidChar = true;    else        fHasInvalidChar = false;    //    //  The first thing we will do is to check for a file name, so that    //  we don't waste time thinking its a URL. If its in the form x:\    //  or x:/ and x is an ASCII letter, then assume that's the deal.    //    if (((*urlText >= chLatin_A) && (*urlText <= chLatin_Z))    ||  ((*urlText >= chLatin_a) && (*urlText <= chLatin_z)))    {        if (*(urlText + 1) == chColon)        {            if ((*(urlText + 2) == chForwardSlash)            ||  (*(urlText + 2) == chBackSlash))            {                ThrowXMLwithMemMgr(MalformedURLException, XMLExcepts::URL_NoProtocolPresent, fMemoryManager);            }        }    }    // Get a copy of the URL that we can modify    XMLCh* srcCpy = XMLString::replicate(urlText, fMemoryManager);    ArrayJanitor<XMLCh> janSrcCopy(srcCpy, fMemoryManager);    //    //  Get a pointer now that we can run up thrown the source as we parse    //  bits and pieces out of it.    //    XMLCh* srcPtr = srcCpy;    // Run up past any spaces    while (*srcPtr)    {        if (!XMLPlatformUtils::fgTransService->isSpace(*srcPtr))            break;        srcPtr++;    }    // Make sure it wasn't all space    if (!*srcPtr)        ThrowXMLwithMemMgr(MalformedURLException, XMLExcepts::URL_NoProtocolPresent, fMemoryManager);    //    //  Ok, the next thing we have to do is to find either a / or : character.    //  If the : is first, we assume we have a protocol. If the / is first,    //  then we skip to the host processing.    //    XMLCh* ptr1 = XMLString::findAny(srcPtr, gListOne);    XMLCh* ptr2;    // If we found a protocol, then deal with it    if (ptr1)    {        if (*ptr1 == chColon)        {            // Cap the string at the colon            *ptr1 = 0;            // And try to find it in our list of protocols            fProtocol = lookupByName(srcPtr);            if (fProtocol == Unknown)            {                ThrowXMLwithMemMgr1                (                    MalformedURLException                    , XMLExcepts::URL_UnsupportedProto1

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
7777精品伊人久久久大香线蕉的| 精品免费视频一区二区| 大胆欧美人体老妇| 狠狠色狠狠色综合| 狠狠色狠狠色合久久伊人| 精品一区二区三区影院在线午夜| 日本aⅴ精品一区二区三区 | 欧美日韩国产高清一区二区三区 | 91在线国内视频| 不卡欧美aaaaa| 99精品视频一区二区三区| jizz一区二区| 色综合网站在线| 欧美日韩精品一区二区| 欧美精品日日鲁夜夜添| 欧美一级欧美一级在线播放| 日韩欧美另类在线| 久久免费视频色| 国产精品三级av在线播放| 中文字幕一区二区三区四区| 亚洲黄一区二区三区| 亚洲一区二区在线观看视频| 日韩电影一二三区| 精品亚洲aⅴ乱码一区二区三区| 紧缚奴在线一区二区三区| 国产精品白丝av| 91无套直看片红桃| 欧美性受xxxx| 欧美电影免费观看高清完整版在线| 日韩免费看的电影| 国产欧美日韩视频在线观看| 国产精品久久久久永久免费观看| 综合婷婷亚洲小说| 午夜电影久久久| 国产又黄又大久久| 一本色道a无线码一区v| 欧美久久久久久蜜桃| 久久婷婷国产综合国色天香| 国产精品久久久久久久午夜片| 伊人夜夜躁av伊人久久| 蜜臀av一级做a爰片久久| 成人涩涩免费视频| 欧美日韩电影一区| 国产网站一区二区| 午夜成人在线视频| 国产精品69毛片高清亚洲| 色诱视频网站一区| 日韩精品一区二区三区视频播放 | 日本不卡123| 国内精品伊人久久久久av影院| 99精品欧美一区| 欧美xxx久久| 亚洲男人的天堂在线观看| 蜜臀av一区二区在线免费观看 | 久久久久国产成人精品亚洲午夜| 最新不卡av在线| 久久99精品久久久久久国产越南| 99久久精品久久久久久清纯| 欧美第一区第二区| 亚洲一区二区黄色| 成人污污视频在线观看| 91精品国产aⅴ一区二区| 中文字幕亚洲一区二区av在线| 蜜桃久久av一区| 在线视频一区二区三| 国产喷白浆一区二区三区| 午夜视频一区在线观看| 972aa.com艺术欧美| 精品乱人伦小说| 亚洲高清免费视频| 色综合中文字幕| 中文成人av在线| 久久国产成人午夜av影院| 在线观看av一区| 国产精品无圣光一区二区| 免费成人在线网站| 欧美日韩日日骚| 亚洲人成在线播放网站岛国| 国产中文字幕一区| 日韩免费在线观看| 日韩黄色免费电影| 欧美在线观看禁18| 亚洲四区在线观看| 成人久久视频在线观看| 久久一区二区三区四区| 蜜臀久久久久久久| 正在播放亚洲一区| 亚洲成人免费在线| 91久久精品国产91性色tv| 亚洲天天做日日做天天谢日日欢 | 91在线观看高清| 国产精品色噜噜| 高清国产午夜精品久久久久久| 欧美不卡激情三级在线观看| 日本午夜精品视频在线观看| 欧美日韩精品免费| 亚洲韩国一区二区三区| 欧美日韩精品欧美日韩精品一| 亚洲国产精品久久久久婷婷884| 91视频精品在这里| 亚洲私人黄色宅男| 99精品视频中文字幕| 亚洲欧美综合色| zzijzzij亚洲日本少妇熟睡| 欧美韩国日本综合| 91网上在线视频| 一区二区在线观看视频在线观看| 91蜜桃在线观看| 国产精品午夜在线观看| 白白色亚洲国产精品| 亚洲男人的天堂网| 欧美三级视频在线观看| 亚洲成人黄色影院| 欧美一区二区性放荡片| 蜜桃一区二区三区在线观看| 精品久久国产老人久久综合| 国产老肥熟一区二区三区| 国产欧美日韩综合| jlzzjlzz国产精品久久| 一区二区三区久久| 欧美日本在线观看| 久久99久久久欧美国产| 久久精品一区二区三区av| 成人午夜视频免费看| 专区另类欧美日韩| 欧美日本一区二区三区四区| 免费成人在线网站| 欧美国产日韩精品免费观看| 97超碰欧美中文字幕| 日韩在线一二三区| 久久久精品免费网站| 91在线看国产| 日韩一区精品视频| 久久久久国产精品人| 一本一道久久a久久精品综合蜜臀| av不卡免费在线观看| 亚洲高清三级视频| 久久综合狠狠综合久久激情 | 日韩欧美中文一区二区| 国内一区二区在线| 亚洲女同一区二区| 日韩欧美国产三级电影视频| av日韩在线网站| 天堂在线亚洲视频| 亚洲国产经典视频| 欧美精品第一页| 国产成人免费视| 污片在线观看一区二区| 久久精品亚洲乱码伦伦中文| 在线观看国产日韩| 国产一区在线观看视频| 一区二区三区四区国产精品| 欧美一区二区三区视频在线| 成人一级黄色片| 亚洲国产精品久久一线不卡| 国产色产综合产在线视频| 欧美亚洲国产一区二区三区| 国产伦理精品不卡| 亚洲一区免费在线观看| 国产欧美综合色| 欧美一级高清片| 色综合视频一区二区三区高清| 另类综合日韩欧美亚洲| 一区二区三区日韩欧美| 26uuu精品一区二区三区四区在线| 91国模大尺度私拍在线视频| 国产一区欧美一区| 亚洲va国产va欧美va观看| 中文字幕电影一区| 精品国产凹凸成av人网站| 欧美色综合网站| 不卡av在线免费观看| 激情久久五月天| 七七婷婷婷婷精品国产| 一级精品视频在线观看宜春院| 欧美激情在线免费观看| 欧美大片一区二区三区| 欧美区视频在线观看| 色菇凉天天综合网| 成人美女在线观看| 国产精品99久久久| 久久se精品一区精品二区| 午夜免费久久看| 一区二区三区四区在线播放 | 韩国精品久久久| 青青草视频一区| 性欧美疯狂xxxxbbbb| 亚洲精品美国一| 成人欧美一区二区三区黑人麻豆| 久久久国产一区二区三区四区小说| 这里只有精品免费| 欧美日韩不卡一区二区| 欧美在线|欧美| 日本精品一区二区三区高清| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 国产乱子伦视频一区二区三区| 亚洲bt欧美bt精品| 亚洲网友自拍偷拍| 亚洲成人第一页| 亚洲国产日产av|