App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | Public Attributes | List of all members
google.appengine.tools.web_xml_parser.WebXmlParser Class Reference
Inheritance diagram for google.appengine.tools.web_xml_parser.WebXmlParser:

Public Member Functions

def ProcessXml
 
def ProcessSecondLevelNode
 
def ProcessServletMappingNode
 
def ProcessFilterMappingNode
 
def ProcessErrorPageNode
 
def ProcessWelcomeFileListNode
 
def ProcessMimeMappingNode
 
def ProcessSecurityConstraintNode
 

Public Attributes

 web_xml
 
 errors
 

Detailed Description

Provides logic for walking down XML tree and pulling data.

Member Function Documentation

def google.appengine.tools.web_xml_parser.WebXmlParser.ProcessErrorPageNode (   self,
  node 
)
Process error page specifications.

If one of the supplied error codes is 404, allow fall through to runtime.

Args:
  node: An ElementTreeNode which looks something like the following.
<error-page>
  <error-code>500</error-code>
  <location>/errors/servererror.jsp</location>
</error-page>
def google.appengine.tools.web_xml_parser.WebXmlParser.ProcessSecurityConstraintNode (   self,
  node 
)
Pulls data from the security constraint node and adds to WebXml object.

Args:
  node: An ElementTree Xml node that looks something like the following:

<security-constraint>
  <web-resource-collection>
    <url-pattern>/profile/*</url-pattern>
  </web-resource-collection>
  <user-data-constraint>
    <transport-guarantee>CONFIDENTIAL</transport-guarantee>
  </user-data-constraint>
</security-constraint>
def google.appengine.tools.web_xml_parser.WebXmlParser.ProcessXml (   self,
  xml_str,
  has_jsps = False 
)
Parses XML string and returns object representation of relevant info.

Uses ElementTree parser to return a tree representation of XML.
Then walks down that tree and extracts important info and adds it to the
object.

Args:
  xml_str: The XML string itself.
  has_jsps: True if the application has *.jsp files.

Returns:
  If there is well-formed but illegal XML, returns a list of
  errors. Otherwise, returns an AppEngineWebXml object containing
  information from XML.

Raises:
  AppEngineConfigException: In case of malformed XML or illegal inputs.

The documentation for this class was generated from the following file: