xpathapi.cxx (e9cbe144) | xpathapi.cxx (b862c97c) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 364 unchanged lines hidden (view full) --- 373 */ 374 if (!pDoc->children) { 375 throw XPathException(); 376 } 377 378 /* Create xpath evaluation context */ 379 ::boost::shared_ptr<xmlXPathContext> const xpathCtx( 380 xmlXPathNewContext(pDoc), xmlXPathFreeContext); | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 364 unchanged lines hidden (view full) --- 373 */ 374 if (!pDoc->children) { 375 throw XPathException(); 376 } 377 378 /* Create xpath evaluation context */ 379 ::boost::shared_ptr<xmlXPathContext> const xpathCtx( 380 xmlXPathNewContext(pDoc), xmlXPathFreeContext); |
381 if (xpathCtx == NULL) { throw XPathException(); } | 381 if( !bool(xpathCtx)) { throw XPathException(); } |
382 383 // set context node 384 xpathCtx->node = pNode; 385 // error handling 386 xpathCtx->error = structured_error_func; 387 xmlSetGenericErrorFunc(NULL, generic_error_func); 388 389 // register namespaces and extension --- 62 unchanged lines hidden --- | 382 383 // set context node 384 xpathCtx->node = pNode; 385 // error handling 386 xpathCtx->error = structured_error_func; 387 xmlSetGenericErrorFunc(NULL, generic_error_func); 388 389 // register namespaces and extension --- 62 unchanged lines hidden --- |