home | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Lift Framework example source code file (PCDataXmlParserSpec.scala)

This example Lift Framework source code file (PCDataXmlParserSpec.scala) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Lift Framework tags/keywords

bluefish, doctype, doctype, noindex, parse, parse, pcdataxmlparser, public, specification, specification, transitional//en, w3c//dtd, xhtml, xhtml

The Lift Framework PCDataXmlParserSpec.scala source code

 * Copyright 2010-2011 WorldWide Conferencing, LLC
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *     http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.

package net.liftweb
package util

import org.specs.Specification

 * Systems under specification for PCDataXmlParser.
object PCDataXmlParserSpec extends Specification("PCDataXmlParser Specification") {
val data1 = """



val data2 = """

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


val data3 = """<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<meta name="generator" content="Bluefish 1.0.7"/>
<meta name="author" content="David Pollak"/>
<meta name="date" content="2010-10-31T05:40:15-0700"/>
<meta name="copyright" content=""/>
<meta name="keywords" content=""/>
<meta name="description" content=""/>
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW"/>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/>
<meta http-equiv="content-style-type" content="text/css"/>


   "PCDataMarkupParser" should {
     "Parse a document with whitespace" in {
       PCDataXmlParser(data1).open_! must ==/ (<html>dude)

     "Parse a document with doctype" in {
       PCDataXmlParser(data2).open_! must ==/ (<html>dude)

     "Parse a document with xml and doctype" in {
       PCDataXmlParser(data3).open_!.apply(0).label must_== "html"



Other Lift Framework examples (source code examples)

Here is a short list of links related to this Lift Framework PCDataXmlParserSpec.scala source code file:

my book on functional programming


new blog posts


Copyright 1998-2019 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.