Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
2.0 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 2000.
  5. //
  6. // File: U H X M L . H
  7. //
  8. // Contents: Helper routines for the XML DOM
  9. //
  10. // Notes:
  11. //
  12. // Author: mbend 8 Oct 2000
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #include <ComUtility.h>
  17. #include "ustring.h"
  18. // Typedefs
  19. typedef SmartComPtr<IXMLDOMDocument> IXMLDOMDocumentPtr;
  20. typedef SmartComPtr<IXMLDOMNode> IXMLDOMNodePtr;
  21. typedef SmartComPtr<IXMLDOMElement> IXMLDOMElementPtr;
  22. typedef SmartComPtr<IXMLDOMNodeList> IXMLDOMNodeListPtr;
  23. typedef SmartComPtr<IXMLDOMNamedNodeMap> IXMLDOMNamedNodeMapPtr;
  24. typedef SmartComPtr<IXMLDOMAttribute> IXMLDOMAttributePtr;
  25. HRESULT HrLoadDocument(BSTR bstrTemplate, IXMLDOMDocumentPtr & pDoc);
  26. HRESULT HrLoadDocumentFromFile(BSTR bstrUrl, IXMLDOMDocumentPtr & pDoc);
  27. HRESULT HrSelectNodes(
  28. const wchar_t * szPattern,
  29. IXMLDOMNodePtr & pNode,
  30. IXMLDOMNodeListPtr & pNodeList);
  31. HRESULT HrSelectNode(
  32. const wchar_t * szPattern,
  33. IXMLDOMNodePtr & pNode,
  34. IXMLDOMNodePtr & pNodeMatch);
  35. HRESULT HrSelectNodeText(
  36. const wchar_t * szPattern,
  37. IXMLDOMNodePtr & pNode,
  38. CUString & strText);
  39. HRESULT HrSelectAndSetNodeText(
  40. const wchar_t * szPattern,
  41. IXMLDOMNodePtr & pNode,
  42. const CUString & strText);
  43. HRESULT HrGetNodeText(
  44. IXMLDOMNodePtr & pNode,
  45. CUString & strText);
  46. HRESULT HrSetNodeText(
  47. IXMLDOMNodePtr & pNode,
  48. const CUString & strText);
  49. HRESULT HrIsNodeEmpty(
  50. IXMLDOMNodePtr & pNode);
  51. HRESULT HrIsNodePresentOnce(
  52. const wchar_t * szPattern,
  53. IXMLDOMNodePtr & pNode);
  54. HRESULT HrIsNodeOfValidLength(
  55. const wchar_t * szPattern,
  56. IXMLDOMNodePtr & pNode,
  57. LONG cchMax);
  58. HRESULT HrIsNodePresentOnceAndEmpty(
  59. const wchar_t * szPattern,
  60. IXMLDOMNodePtr & pNode);
  61. HRESULT HrIsNodePresentOnceAndNotEmpty(
  62. const wchar_t * szPattern,
  63. IXMLDOMNodePtr & pNode);