Home
Developers

Developers

  • Documentation
    • Developer Guide
    • API Reference
    • Style Guide
    • How-To
    • Troubleshooting
  • Submit a Flake
  • Support

Pageflakes API Reference

  • Flake System Object
  • Flake User Object
  • Pageflakes Functions
    • DOM Manipulation
    • Element Visibility
    • Element State
    • Class Manipulations
    • Positioning
    • Cursor
    • Progress Bar
    • Element Opacity
    • Cookies
    • Miscellaneous
    • Events
    • Window
    • XML
    • Page
  • Array Extensions
  • String Extensions
  • ContentProxy
  • App
  • RSS
  • Tooltip Manager
  • Public, Shared, and Private Pages
  • Server-Side Scripting
Home » Documentation » API Reference » Pageflakes Functions

XML

getXmlDoc(xmlString)

Returns an XML DOM object from an XML string.
Use the DOM object with the following two functions.

getFirstNode(xmlDoc, pattern)

Returns the first XML node from the provided XML document that matches the provided pattern. For example:

var node = PF.getFirstNode(xmlDoc, "book");

To find an element by specifying multiple node names, use a pattern like this:

var node = PF.getFirstNode(xmlDoc, "book:author:firstname");

getNodes(xmlDoc, pattern)

Returns and array of XML nodes (JavaScript Node objects) from the provided XML document that match the provided pattern. For example:

var nodes = PF.getNodes(xmlDoc, "book");

To find elements by specifying multiple node names, use a pattern like this:

var nodes = PF.getNodes(xmlDoc, "book:author:firstname");

‹ WindowupPage ›
»
  • Printer-friendly version