Back to index

lightning-sunbird  0.9+nobinonly
Functions
nsXMLProcessingInstruction.cpp File Reference
#include "nsGenericElement.h"
#include "nsLayoutAtoms.h"
#include "nsUnicharUtils.h"
#include "nsXMLProcessingInstruction.h"
#include "nsParserUtils.h"
#include "nsContentCreatorFunctions.h"

Go to the source code of this file.

Functions

nsresult NS_NewXMLProcessingInstruction (nsIContent **aInstancePtrResult, nsNodeInfoManager *aNodeInfoManager, const nsAString &aTarget, const nsAString &aData)
 aNodeInfoManager must not be null.

Function Documentation

nsresult NS_NewXMLProcessingInstruction ( nsIContent **  aInstancePtrResult,
nsNodeInfoManager aNodeInfoManager,
const nsAString &  aTarget,
const nsAString &  aData 
)

aNodeInfoManager must not be null.

Definition at line 46 of file nsXMLProcessingInstruction.cpp.

{
  NS_PRECONDITION(aNodeInfoManager, "Missing nodeinfo manager");

  if (aTarget.EqualsLiteral("xml-stylesheet")) {
    return NS_NewXMLStylesheetProcessingInstruction(aInstancePtrResult,
                                                    aNodeInfoManager, aData);
  }

  *aInstancePtrResult = nsnull;

  nsXMLProcessingInstruction *instance =
    new nsXMLProcessingInstruction(aNodeInfoManager, aTarget, aData);
  if (!instance) {
    return NS_ERROR_OUT_OF_MEMORY;
  }

  NS_ADDREF(*aInstancePtrResult = instance);

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function: