<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jsharda</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jsharda"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Jsharda"/>
	<updated>2026-08-12T02:21:26Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_M1503_Integrate_xml5ever_XML_parser&amp;diff=100378</id>
		<title>CSC/ECE 517 Fall 2015 M1503 Integrate xml5ever XML parser</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_M1503_Integrate_xml5ever_XML_parser&amp;diff=100378"/>
		<updated>2015-12-06T19:13:19Z</updated>

		<summary type="html">&lt;p&gt;Jsharda: Grammar edits&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rust ==&lt;br /&gt;
&lt;br /&gt;
Rust is a general-purpose, compiled programming language developed by [https://en.wikipedia.org/wiki/Mozilla Mozilla Research]. The syntax of [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] is somewhat  similar to [https://en.wikipedia.org/wiki/C_(programming_language) C] and [https://en.wikipedia.org/wiki/C%2B%2B C++], with blocks of code delimited by curly brackets, and control flow and structure. Rust does not use automatic [https://en.wikipedia.org/wiki/Garbage_collection_(computer_science) garbage collection] mechanism similar to [https://en.wikipedia.org/wiki/Java_(programming_language) java]. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms.&lt;br /&gt;
&lt;br /&gt;
== Servo ==&lt;br /&gt;
&lt;br /&gt;
Servo is web browser layout engine developed by Mozilla Research. It was developed in Rust. [https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] handles parallel environments such as rendering, layout, image decoding as a separate tasks. Servo provides [https://en.wikipedia.org/wiki/Application_programming_interface APIs], [https://en.wikipedia.org/wiki/JavaScript JavaScript] support. Servo was not developed explicitly to create full web browser but to achieve maximum parallelism.&lt;br /&gt;
&lt;br /&gt;
== Compilation and Build ==&lt;br /&gt;
&lt;br /&gt;
Servo's build system automatically downloads a snapshot Rust compiler to build itself. This is normally a specific revision of Rust upstream, but sometimes has a backported patch or two.&lt;br /&gt;
&lt;br /&gt;
Code link: https://github.com/servo/servo/ . This repository is forked to https://github.com/ronak6892/servo .&lt;br /&gt;
&lt;br /&gt;
Servo is built with Cargo, the Rust package manager. We also use Mozilla's Mach tools to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
==== Normal build ====&lt;br /&gt;
&lt;br /&gt;
To build Servo in development mode. This is useful for development, but the resulting binary is very slow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/servo/servo&lt;br /&gt;
cd servo&lt;br /&gt;
./mach build --dev&lt;br /&gt;
./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For benchmarking, performance testing, or real-world use, add the --release flag to create an optimized build:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach build --release&lt;br /&gt;
./mach run --release tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Building for Android target ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/servo/servo&lt;br /&gt;
cd servo&lt;br /&gt;
ANDROID_TOOLCHAIN=/path/to/toolchain ANDROID_NDK=/path/to/ndk PATH=$PATH:/path/to/toolchain/bin ./mach build --android&lt;br /&gt;
cd ports/android&lt;br /&gt;
ANDROID_SDK=/path/to/sdk make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rather than setting the ANDROID_* environment variables every time, you can also create a .servobuild file and then edit it to contain the correct paths to the Android SDK/NDK tools:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp servobuild.example .servobuild&lt;br /&gt;
# edit .servobuild&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Running ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach run [url] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
==== Background information ====&lt;br /&gt;
Servo uses a custom HTML5 parser written in Rust, called [https://github.com/servo/html5ever/ HTML5ever]. Servo currently lacks a parser for [https://en.wikipedia.org/wiki/XML XML] documents, which prevents it from running [https://en.wikipedia.org/wiki/XHTML XHTML] tests and implementing APIs that rely on it.&lt;br /&gt;
[https://github.com/Ygg01/xml5ever XML5ever] which is an experimental XML parser that works on a modified specification of XML called XML5, which drops certain properties of XML like well-formedness for better compatibility with HTML and better error recovery. XML5ever is based largely on HTML5ever parser.&lt;br /&gt;
&lt;br /&gt;
==== Goal ====&lt;br /&gt;
The goal of the project is to integrate  XML5ever parser into Servo for parsing of XML documents which is currently not present in Servo. After the project, Servo will differentiate between HTML and XML documents and parse them accordingly using their respective parser which is currently lacking in it.&lt;br /&gt;
&lt;br /&gt;
== Steps done as part of the OSS Project==&lt;br /&gt;
&lt;br /&gt;
To achieve project goal we have done following initial steps in our OSS project (which have already been merged in Servo's master branch).&lt;br /&gt;
&lt;br /&gt;
* Complied servo and added xml5ever as a dependency to the script crate using cargo package manager. To do this we edited Cargo.toml located at components/script by adding xml5ever as a dependency.&lt;br /&gt;
&lt;br /&gt;
* Added xml.rs at components/script/parse with parse_xml() as a function. Declared xml as public module in mod.rs in order to declare file.&lt;br /&gt;
&lt;br /&gt;
* declared an empty ServoXMLParser interface in a [https://en.wikipedia.org/wiki/Web_IDL webidl] file located at located at components/script/dom/webidls.&lt;br /&gt;
&lt;br /&gt;
* Implemented ServoXMLParser interface with necessary stubs in servoxmlparser.rs located at components/script/dom. Also declared servoxmlparser as public module in mod.rs located at components/script/dom.&lt;br /&gt;
&lt;br /&gt;
* Called parse_xml from domparser.rs located at components/script/dom this will help compile.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
To integrate XML5ever, dependency was added for XML5ever parser similar to HTML5ever.A separate interface was defined in ServoXMLParser webidl file and this interface was implemented in its corresponding rust file along with necessary stubs to parse XML. &lt;br /&gt;
&lt;br /&gt;
==== UML diagram ====&lt;br /&gt;
&lt;br /&gt;
[[File:UML1 XML5ever.png]]&lt;br /&gt;
&lt;br /&gt;
==== Design pattern ====&lt;br /&gt;
&lt;br /&gt;
The Adapter Design Pattern was applied to enhance parsing mechanism for XML5 in Servo. Interface defined using adapter pattern closely resembles servoHTMLParser interface as this will facilitate parsing or modifying any code for both XML and [https://en.wikipedia.org/wiki/HTML HTML] documents and future reader don't have to understand code for both separately as they are related in their functionality.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
* Modify Script::load in scipt_task.rs to check whether document being parsed is of type text/xml. When content type of the document is text/xml, parse_xml method which we was defined in OSS project will be called. Earlier it called parse_html for all the documents but now since we are integrating the XML parser, it will call parse_xml instead of parse_html, while passing the appropriate flag to the Document constructor.&lt;br /&gt;
* Sink was implemented for ServoXMLParser in which a utility function is defined get_or_create which searches for a child and if not found then creates a new one and returns it.&lt;br /&gt;
* XML5Ever defines an interface of TreeSink for integrating it. Implementation of this TreeSink was provided in xml.rs. It included implementation of following functions:&lt;br /&gt;
** get_document : returns the xml document being parsed&lt;br /&gt;
** elem_name : returns the name of node of the XML Document specified in the argument&lt;br /&gt;
** create_element : creates a new elements, sets its attributes provided in the argument and returns newly created element&lt;br /&gt;
** create_comment : creates a new comment node using the text specified in the argument&lt;br /&gt;
** append(parent, child) : fins the child using get_or_create function defined in Sink(previous step) and appends it to to the parent node&lt;br /&gt;
** append_doctype_to_document : creates doctype using public_id and system_id provided in the arguments and appends it to the parent node&lt;br /&gt;
** create_pi : creates processing instructions using the target and data in the arguments and returns in reference&lt;br /&gt;
&lt;br /&gt;
* To use the code added in previous step, new function was defined for ServoXMLParser which consisted creation of Sink, XmlTreeBuilder, XMLTokenizer and provided these attributes to its constructor and returned a DOM Object. To call actual parser, implementation of parse_xml was provided in the xml.rs which created new ServoXMLParser using the arguments provided and passed the input document to parse_chunk method.&lt;br /&gt;
&lt;br /&gt;
*After implementing above steps, some tests for &amp;quot;text/xml&amp;quot; content-type crashed. To stop that, implementation of resume, suspend, is_suspended and parse_sync methods was provided in ServoXMLParser which used tokenizer methods of XML5Ever and run the parser on input data. This prevented the tests from crashing and behave as expected.&lt;br /&gt;
&lt;br /&gt;
* Support for XML document responses needs to be implemented. In this step,response Document and its MIME type needs to be checked and if either one of them is null then function will return null otherwise if MIME type is text/html then its charset will be checked and if its null then set it will be set to UTF-8 and if MIME type is text/xml then document will be defined as a Document that represents the result of running the XML parser with XML scripting support disabled on bytes. At the end of this step based on above condition,document’s encoding will be set to charset, content type to final MIME type and url to document’s URL and this response document object will be returned.&lt;br /&gt;
* Implement XMLDocument API:&lt;br /&gt;
# adding the new IDL file at components/script/dom/webidls/XMLDocument.webidl;&lt;br /&gt;
# creating components/script/dom/XMLDocument.rs;&lt;br /&gt;
# listing XMLDocument .rs in components/script/dom/mod.rs;&lt;br /&gt;
# defining the DOM struct XMLDocument with a #[dom_struct] attribute, a superclass or Reflector member, and other members as appropriate;&lt;br /&gt;
# implementing the dom::bindings::codegen::Bindings::XMLDocumentBindings::XMLDocumentMethods trait for &amp;amp;'a XMLDocument.&lt;br /&gt;
# In XMLDocument.webidl file, implement the load method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  partial interface XMLDocument {&lt;br /&gt;
	boolean load(DOMString url);&lt;br /&gt;
  };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Since new requirements were added of using the newly added code to integrate the actual parser, scope of our project was restricted to the first 3 tasks and last task was removed after contacting TA and Josh Matthews. &lt;br /&gt;
&lt;br /&gt;
== Challenges ==&lt;br /&gt;
&lt;br /&gt;
Primary challenge in this project is to continuously sync with the latest commits of servo and ensuring build success after integrating each step. Adding necessary stubs in the newly added files as per the changes in parsing mechanism will also need continuous and careful efforts. Parsing of XML document incorporates many input arguments so error checking for all the edge cases will also be a challenge while implementing TreeSink and support for XML HttpRequest.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
To integrate the model of XML parser into current servo code, no extra test cases were added. We have added interface files and method stubs, XML parser functionality will be implemented as subsequent steps in final project. Integration success is tested by successful compilation and build after adding our changes. Following commands are used to check that all test cases were passed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
./mach test-tidy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the modifications which were suggested by servo community through comments on pull request, have been incorporated and pull request has been merged successfully.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
Servo Documentation - http://doc.servo.org/servo/index.html&lt;br /&gt;
&lt;br /&gt;
Project Definition - https://github.com/servo/servo/wiki/Integrate-xml5ever&lt;br /&gt;
&lt;br /&gt;
Rust Documentation - https://doc.rust-lang.org/nightly/index.html&lt;br /&gt;
&lt;br /&gt;
XML specs - https://xhr.spec.whatwg.org/#document-response&lt;br /&gt;
&lt;br /&gt;
YouTube - https://youtu.be/i8dONOzYwlc&lt;/div&gt;</summary>
		<author><name>Jsharda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_M1503_Integrate_xml5ever_XML_parser&amp;diff=100377</id>
		<title>CSC/ECE 517 Fall 2015 M1503 Integrate xml5ever XML parser</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_M1503_Integrate_xml5ever_XML_parser&amp;diff=100377"/>
		<updated>2015-12-06T19:11:32Z</updated>

		<summary type="html">&lt;p&gt;Jsharda: Task 2 Additional Work&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rust ==&lt;br /&gt;
&lt;br /&gt;
Rust is a general-purpose, compiled programming language developed by [https://en.wikipedia.org/wiki/Mozilla Mozilla Research]. The syntax of [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] is somewhat  similar to [https://en.wikipedia.org/wiki/C_(programming_language) C] and [https://en.wikipedia.org/wiki/C%2B%2B C++], with blocks of code delimited by curly brackets, and control flow and structure. Rust does not use automatic [https://en.wikipedia.org/wiki/Garbage_collection_(computer_science) garbage collection] mechanism similar to [https://en.wikipedia.org/wiki/Java_(programming_language) java]. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms.&lt;br /&gt;
&lt;br /&gt;
== Servo ==&lt;br /&gt;
&lt;br /&gt;
Servo is web browser layout engine developed by Mozilla Research. It was developed in Rust. [https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] handles parallel environments such as rendering, layout, image decoding as a separate tasks. Servo provides [https://en.wikipedia.org/wiki/Application_programming_interface APIs], [https://en.wikipedia.org/wiki/JavaScript JavaScript] support. Servo was not developed explicitly to create full web browser but to achieve maximum parallelism.&lt;br /&gt;
&lt;br /&gt;
== Compilation and Build ==&lt;br /&gt;
&lt;br /&gt;
Servo's build system automatically downloads a snapshot Rust compiler to build itself. This is normally a specific revision of Rust upstream, but sometimes has a backported patch or two.&lt;br /&gt;
&lt;br /&gt;
Code link: https://github.com/servo/servo/ . This repository is forked to https://github.com/ronak6892/servo .&lt;br /&gt;
&lt;br /&gt;
Servo is built with Cargo, the Rust package manager. We also use Mozilla's Mach tools to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
==== Normal build ====&lt;br /&gt;
&lt;br /&gt;
To build Servo in development mode. This is useful for development, but the resulting binary is very slow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/servo/servo&lt;br /&gt;
cd servo&lt;br /&gt;
./mach build --dev&lt;br /&gt;
./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For benchmarking, performance testing, or real-world use, add the --release flag to create an optimized build:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach build --release&lt;br /&gt;
./mach run --release tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Building for Android target ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/servo/servo&lt;br /&gt;
cd servo&lt;br /&gt;
ANDROID_TOOLCHAIN=/path/to/toolchain ANDROID_NDK=/path/to/ndk PATH=$PATH:/path/to/toolchain/bin ./mach build --android&lt;br /&gt;
cd ports/android&lt;br /&gt;
ANDROID_SDK=/path/to/sdk make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rather than setting the ANDROID_* environment variables every time, you can also create a .servobuild file and then edit it to contain the correct paths to the Android SDK/NDK tools:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp servobuild.example .servobuild&lt;br /&gt;
# edit .servobuild&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Running ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach run [url] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
==== Background information ====&lt;br /&gt;
Servo uses a custom HTML5 parser written in Rust, called [https://github.com/servo/html5ever/ HTML5ever]. Servo currently lacks a parser for [https://en.wikipedia.org/wiki/XML XML] documents, which prevents it from running [https://en.wikipedia.org/wiki/XHTML XHTML] tests and implementing APIs that rely on it.&lt;br /&gt;
[https://github.com/Ygg01/xml5ever XML5ever] which is an experimental XML parser that works on a modified specification of XML called XML5, which drops certain properties of XML like well-formedness for better compatibility with HTML and better error recovery. XML5ever is based largely on HTML5ever parser.&lt;br /&gt;
&lt;br /&gt;
==== Goal ====&lt;br /&gt;
The goal of the project is to integrate  XML5ever parser into Servo for parsing of XML documents which is currently not present in Servo. After the project, Servo will differentiate between HTML and XML documents and parse them accordingly using their respective parser which is currently lacking in it.&lt;br /&gt;
&lt;br /&gt;
== Steps done as part of the OSS Project==&lt;br /&gt;
&lt;br /&gt;
To achieve project goal we have done following initial steps in our OSS project (which have already been merged in Servo's master branch).&lt;br /&gt;
&lt;br /&gt;
* Complied servo and added xml5ever as a dependency to the script crate using cargo package manager. To do this we edited Cargo.toml located at components/script by adding xml5ever as a dependency.&lt;br /&gt;
&lt;br /&gt;
* Added xml.rs at components/script/parse with parse_xml() as a function. Declared xml as public module in mod.rs in order to declare file.&lt;br /&gt;
&lt;br /&gt;
* declared an empty ServoXMLParser interface in a [https://en.wikipedia.org/wiki/Web_IDL webidl] file located at located at components/script/dom/webidls.&lt;br /&gt;
&lt;br /&gt;
* Implemented ServoXMLParser interface with necessary stubs in servoxmlparser.rs located at components/script/dom. Also declared servoxmlparser as public module in mod.rs located at components/script/dom.&lt;br /&gt;
&lt;br /&gt;
* Called parse_xml from domparser.rs located at components/script/dom this will help compile.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
To integrate XML5ever, dependency was added for XML5ever parser similar to HTML5ever.A separate interface was defined in ServoXMLParser webidl file and this interface was implemented in its corresponding rust file along with necessary stubs to parse XML. &lt;br /&gt;
&lt;br /&gt;
==== UML diagram ====&lt;br /&gt;
&lt;br /&gt;
[[File:UML1 XML5ever.png]]&lt;br /&gt;
&lt;br /&gt;
==== Design pattern ====&lt;br /&gt;
&lt;br /&gt;
The Adapter Design Pattern was applied to enhance parsing mechanism for XML5 in Servo. Interface defined using adapter pattern closely resembles servoHTMLParser interface as this will facilitate parsing or modifying any code for both XML and [https://en.wikipedia.org/wiki/HTML HTML] documents and future reader don't have to understand code for both separately as they are related in their functionality.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
* Modify Script::load in scipt_task.rs to check whether document being parsed is of type text/xml. When content type of the document is text/xml, parse_xml method which we was defined in OSS project will be called. Earlier it called parse_html for all the documents but now since we are integrating the XML parser, it will call parse_xml instead of parse_html, while passing the appropriate flag to the Document constructor.&lt;br /&gt;
* Sink was implemented for ServoXMLParser in which a utility function is defined get_or_create which searches for a child and if not found then creates a new one and returns it.&lt;br /&gt;
* XML5Ever defines an interface of TreeSink for integrating it. Implementation of this TreeSink was provided in xml.rs. It included implementation of following functions:&lt;br /&gt;
** get_document : returns the xml document being parsed&lt;br /&gt;
** elem_name : returns the name of node of the XML Document specified in the argument&lt;br /&gt;
** create_element : creates a new elements, sets its attributes provided in the argument and returns newly created element&lt;br /&gt;
** create_comment : creates a new comment node using the text specified in the argument&lt;br /&gt;
** append(parent, child) : fins the child using get_or_create function defined in Sink(previous step) and appends it to to the parent node&lt;br /&gt;
** append_doctype_to_document : creates doctype using public_id and system_id provided in the arguments and appends it to the parent node&lt;br /&gt;
** create_pi : creates processing instructions using the target and data in the arguments and returns in reference&lt;br /&gt;
&lt;br /&gt;
* To use the coded added in previous step, new function was defined for ServoXMLParser which consisted creating of Sink, XmlTreeBuilder, XMLTokenizer and provided these attributes to its constructor and returned a DOM Object. To call actual parser, implementation of parse_xml was provided in the xml.rs which created new ServoXMLParser using the arguments provided and parsed the input document to parse_chunk method.&lt;br /&gt;
&lt;br /&gt;
*After implementing above steps, some tests for &amp;quot;text/xml&amp;quot; content-type crashed. To stop that, implementation of resume, suspend, is_suspended and parse_sync methods was provided in ServoXMLParser which used tokenizer methods of XML5Ever and run the parser on input data.&lt;br /&gt;
&lt;br /&gt;
* Support for XML document responses needs to be implemented. In this step,response Document and its MIME type needs to be checked and if either one of them is null then function will return null otherwise if MIME type is text/html then its charset will be checked and if its null then set it will be set to UTF-8 and if MIME type is text/xml then document will be defined as a Document that represents the result of running the XML parser with XML scripting support disabled on bytes. At the end of this step based on above condition,document’s encoding will be set to charset, content type to final MIME type and url to document’s URL and this response document object will be returned.&lt;br /&gt;
* Implement XMLDocument API:&lt;br /&gt;
# adding the new IDL file at components/script/dom/webidls/XMLDocument.webidl;&lt;br /&gt;
# creating components/script/dom/XMLDocument.rs;&lt;br /&gt;
# listing XMLDocument .rs in components/script/dom/mod.rs;&lt;br /&gt;
# defining the DOM struct XMLDocument with a #[dom_struct] attribute, a superclass or Reflector member, and other members as appropriate;&lt;br /&gt;
# implementing the dom::bindings::codegen::Bindings::XMLDocumentBindings::XMLDocumentMethods trait for &amp;amp;'a XMLDocument.&lt;br /&gt;
# In XMLDocument.webidl file, implement the load method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  partial interface XMLDocument {&lt;br /&gt;
	boolean load(DOMString url);&lt;br /&gt;
  };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Since new requirements were added of using the newly added code to integrate the actual parser, scope of our project was restricted to the first 3 tasks and last task was removed after contacting TA and Josh Matthews. &lt;br /&gt;
&lt;br /&gt;
== Challenges ==&lt;br /&gt;
&lt;br /&gt;
Primary challenge in this project is to continuously sync with the latest commits of servo and ensuring build success after integrating each step. Adding necessary stubs in the newly added files as per the changes in parsing mechanism will also need continuous and careful efforts. Parsing of XML document incorporates many input arguments so error checking for all the edge cases will also be a challenge while implementing TreeSink and support for XML HttpRequest.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
To integrate the model of XML parser into current servo code, no extra test cases were added. We have added interface files and method stubs, XML parser functionality will be implemented as subsequent steps in final project. Integration success is tested by successful compilation and build after adding our changes. Following commands are used to check that all test cases were passed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
./mach test-tidy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the modifications which were suggested by servo community through comments on pull request, have been incorporated and pull request has been merged successfully.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
Servo Documentation - http://doc.servo.org/servo/index.html&lt;br /&gt;
&lt;br /&gt;
Project Definition - https://github.com/servo/servo/wiki/Integrate-xml5ever&lt;br /&gt;
&lt;br /&gt;
Rust Documentation - https://doc.rust-lang.org/nightly/index.html&lt;br /&gt;
&lt;br /&gt;
XML specs - https://xhr.spec.whatwg.org/#document-response&lt;br /&gt;
&lt;br /&gt;
YouTube - https://youtu.be/i8dONOzYwlc&lt;/div&gt;</summary>
		<author><name>Jsharda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_M1503_Integrate_xml5ever_XML_parser&amp;diff=100376</id>
		<title>CSC/ECE 517 Fall 2015 M1503 Integrate xml5ever XML parser</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_M1503_Integrate_xml5ever_XML_parser&amp;diff=100376"/>
		<updated>2015-12-06T18:47:02Z</updated>

		<summary type="html">&lt;p&gt;Jsharda: Details of TreeSink Implementation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rust ==&lt;br /&gt;
&lt;br /&gt;
Rust is a general-purpose, compiled programming language developed by [https://en.wikipedia.org/wiki/Mozilla Mozilla Research]. The syntax of [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] is somewhat  similar to [https://en.wikipedia.org/wiki/C_(programming_language) C] and [https://en.wikipedia.org/wiki/C%2B%2B C++], with blocks of code delimited by curly brackets, and control flow and structure. Rust does not use automatic [https://en.wikipedia.org/wiki/Garbage_collection_(computer_science) garbage collection] mechanism similar to [https://en.wikipedia.org/wiki/Java_(programming_language) java]. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms.&lt;br /&gt;
&lt;br /&gt;
== Servo ==&lt;br /&gt;
&lt;br /&gt;
Servo is web browser layout engine developed by Mozilla Research. It was developed in Rust. [https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] handles parallel environments such as rendering, layout, image decoding as a separate tasks. Servo provides [https://en.wikipedia.org/wiki/Application_programming_interface APIs], [https://en.wikipedia.org/wiki/JavaScript JavaScript] support. Servo was not developed explicitly to create full web browser but to achieve maximum parallelism.&lt;br /&gt;
&lt;br /&gt;
== Compilation and Build ==&lt;br /&gt;
&lt;br /&gt;
Servo's build system automatically downloads a snapshot Rust compiler to build itself. This is normally a specific revision of Rust upstream, but sometimes has a backported patch or two.&lt;br /&gt;
&lt;br /&gt;
Code link: https://github.com/servo/servo/ . This repository is forked to https://github.com/ronak6892/servo .&lt;br /&gt;
&lt;br /&gt;
Servo is built with Cargo, the Rust package manager. We also use Mozilla's Mach tools to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
==== Normal build ====&lt;br /&gt;
&lt;br /&gt;
To build Servo in development mode. This is useful for development, but the resulting binary is very slow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/servo/servo&lt;br /&gt;
cd servo&lt;br /&gt;
./mach build --dev&lt;br /&gt;
./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For benchmarking, performance testing, or real-world use, add the --release flag to create an optimized build:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach build --release&lt;br /&gt;
./mach run --release tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Building for Android target ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/servo/servo&lt;br /&gt;
cd servo&lt;br /&gt;
ANDROID_TOOLCHAIN=/path/to/toolchain ANDROID_NDK=/path/to/ndk PATH=$PATH:/path/to/toolchain/bin ./mach build --android&lt;br /&gt;
cd ports/android&lt;br /&gt;
ANDROID_SDK=/path/to/sdk make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rather than setting the ANDROID_* environment variables every time, you can also create a .servobuild file and then edit it to contain the correct paths to the Android SDK/NDK tools:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp servobuild.example .servobuild&lt;br /&gt;
# edit .servobuild&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Running ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach run [url] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
==== Background information ====&lt;br /&gt;
Servo uses a custom HTML5 parser written in Rust, called [https://github.com/servo/html5ever/ HTML5ever]. Servo currently lacks a parser for [https://en.wikipedia.org/wiki/XML XML] documents, which prevents it from running [https://en.wikipedia.org/wiki/XHTML XHTML] tests and implementing APIs that rely on it.&lt;br /&gt;
[https://github.com/Ygg01/xml5ever XML5ever] which is an experimental XML parser that works on a modified specification of XML called XML5, which drops certain properties of XML like well-formedness for better compatibility with HTML and better error recovery. XML5ever is based largely on HTML5ever parser.&lt;br /&gt;
&lt;br /&gt;
==== Goal ====&lt;br /&gt;
The goal of the project is to integrate  XML5ever parser into Servo for parsing of XML documents which is currently not present in Servo. After the project, Servo will differentiate between HTML and XML documents and parse them accordingly using their respective parser which is currently lacking in it.&lt;br /&gt;
&lt;br /&gt;
== Steps done as part of the OSS Project==&lt;br /&gt;
&lt;br /&gt;
To achieve project goal we have done following initial steps in our OSS project (which have already been merged in Servo's master branch).&lt;br /&gt;
&lt;br /&gt;
* Complied servo and added xml5ever as a dependency to the script crate using cargo package manager. To do this we edited Cargo.toml located at components/script by adding xml5ever as a dependency.&lt;br /&gt;
&lt;br /&gt;
* Added xml.rs at components/script/parse with parse_xml() as a function. Declared xml as public module in mod.rs in order to declare file.&lt;br /&gt;
&lt;br /&gt;
* declared an empty ServoXMLParser interface in a [https://en.wikipedia.org/wiki/Web_IDL webidl] file located at located at components/script/dom/webidls.&lt;br /&gt;
&lt;br /&gt;
* Implemented ServoXMLParser interface with necessary stubs in servoxmlparser.rs located at components/script/dom. Also declared servoxmlparser as public module in mod.rs located at components/script/dom.&lt;br /&gt;
&lt;br /&gt;
* Called parse_xml from domparser.rs located at components/script/dom this will help compile.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
To integrate XML5ever, dependency was added for XML5ever parser similar to HTML5ever.A separate interface was defined in ServoXMLParser webidl file and this interface was implemented in its corresponding rust file along with necessary stubs to parse XML. &lt;br /&gt;
&lt;br /&gt;
==== UML diagram ====&lt;br /&gt;
&lt;br /&gt;
[[File:UML1 XML5ever.png]]&lt;br /&gt;
&lt;br /&gt;
==== Design pattern ====&lt;br /&gt;
&lt;br /&gt;
The Adapter Design Pattern was applied to enhance parsing mechanism for XML5 in Servo. Interface defined using adapter pattern closely resembles servoHTMLParser interface as this will facilitate parsing or modifying any code for both XML and [https://en.wikipedia.org/wiki/HTML HTML] documents and future reader don't have to understand code for both separately as they are related in their functionality.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
* Modify Script::load in scipt_task.rs to check whether document being parsed is of type text/xml. When content type of the document is text/xml, parse_xml method which we was defined in OSS project will be called. Earlier it called parse_html for all the documents but now since we are integrating the XML parser, it will call parse_xml instead of parse_html, while passing the appropriate flag to the Document constructor.&lt;br /&gt;
* Sink was implemented for ServoXMLParser in which a utility function is defined get_or_create which searches for a child and if not found then creates a new one and returns it.&lt;br /&gt;
* XML5Ever defines an interface of TreeSink for integrating it. Implementation of this TreeSink was provided in xml.rs. It included implementation of following functions:&lt;br /&gt;
# get_document : returns the xml document being parsed&lt;br /&gt;
# elem_name : returns the name of node of the XML Document specified in the argument&lt;br /&gt;
# create_element : creates a new elements, sets its attributes provided in the argument and returns newly created element&lt;br /&gt;
# create_comment : creates a new comment node using the text specified in the argument&lt;br /&gt;
# append(parent, child) : fins the child using get_or_create function defined in Sink(previous step) and appends it to to the parent node&lt;br /&gt;
# append_doctype_to_document : creates doctype using public_id and system_id provided in the arguments and appends it to the parent node&lt;br /&gt;
# create_pi : creates processing instructions using the target and data in the arguments and returns in reference&lt;br /&gt;
&lt;br /&gt;
* Implementing a TreeSink for the XML parser which will pick nodes from XML document and append them to XML tree in the hierarchy. Serializable module also needs to be implemented in order to implement TreeSink. &lt;br /&gt;
* Support for XML document responses needs to be implemented. In this step,response Document and its MIME type needs to be checked and if either one of them is null then function will return null otherwise if MIME type is text/html then its charset will be checked and if its null then set it will be set to UTF-8 and if MIME type is text/xml then document will be defined as a Document that represents the result of running the XML parser with XML scripting support disabled on bytes. At the end of this step based on above condition,document’s encoding will be set to charset, content type to final MIME type and url to document’s URL and this response document object will be returned.&lt;br /&gt;
* Implement XMLDocument API:&lt;br /&gt;
# adding the new IDL file at components/script/dom/webidls/XMLDocument.webidl;&lt;br /&gt;
# creating components/script/dom/XMLDocument.rs;&lt;br /&gt;
# listing XMLDocument .rs in components/script/dom/mod.rs;&lt;br /&gt;
# defining the DOM struct XMLDocument with a #[dom_struct] attribute, a superclass or Reflector member, and other members as appropriate;&lt;br /&gt;
# implementing the dom::bindings::codegen::Bindings::XMLDocumentBindings::XMLDocumentMethods trait for &amp;amp;'a XMLDocument.&lt;br /&gt;
# In XMLDocument.webidl file, implement the load method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  partial interface XMLDocument {&lt;br /&gt;
	boolean load(DOMString url);&lt;br /&gt;
  };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The load(url) method will check and validate url specified in the method call and set readiness of current document to &amp;quot;loading&amp;quot;. It will then start a request-response flow in which it will initiate a request with destination as sub-resource and its response will be result of the fetched request. If this response's Content-Type metadata is an XML MIME type then it will create a new XML parser associated with result document and pass this parser responses' body and success set to true and readiness of this document will be set to &amp;quot;Complete&amp;quot;. At the end, it will replace all children of document by the children of the result followed by mutation events so the XML document gets loaded.&lt;br /&gt;
&lt;br /&gt;
== Challenges ==&lt;br /&gt;
&lt;br /&gt;
Primary challenge in this project is to continuously sync with the latest commits of servo and ensuring build success after integrating each step. Adding necessary stubs in the newly added files as per the changes in parsing mechanism will also need continuous and careful efforts. Parsing of XML document incorporates many input arguments so error checking for all the edge cases will also be a challenge while implementing TreeSink and support for XML HttpRequest.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
To integrate the model of XML parser into current servo code, no extra test cases were added. We have added interface files and method stubs, XML parser functionality will be implemented as subsequent steps in final project. Integration success is tested by successful compilation and build after adding our changes. Following commands are used to check that all test cases were passed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
./mach test-tidy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the modifications which were suggested by servo community through comments on pull request, have been incorporated and pull request has been merged successfully.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
Servo Documentation - http://doc.servo.org/servo/index.html&lt;br /&gt;
&lt;br /&gt;
Project Definition - https://github.com/servo/servo/wiki/Integrate-xml5ever&lt;br /&gt;
&lt;br /&gt;
Rust Documentation - https://doc.rust-lang.org/nightly/index.html&lt;br /&gt;
&lt;br /&gt;
XML specs - https://xhr.spec.whatwg.org/#document-response&lt;br /&gt;
&lt;br /&gt;
YouTube - https://youtu.be/i8dONOzYwlc&lt;/div&gt;</summary>
		<author><name>Jsharda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_M1503_Integrate_xml5ever_XML_parser&amp;diff=99730</id>
		<title>CSC/ECE 517 Fall 2015 M1503 Integrate xml5ever XML parser</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_M1503_Integrate_xml5ever_XML_parser&amp;diff=99730"/>
		<updated>2015-11-13T23:47:17Z</updated>

		<summary type="html">&lt;p&gt;Jsharda: Changes in Challenges Section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rust ==&lt;br /&gt;
&lt;br /&gt;
Rust is a general-purpose, compiled programming language developed by [https://en.wikipedia.org/wiki/Mozilla Mozilla Research]. The syntax of [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] is somewhat  similar to [https://en.wikipedia.org/wiki/C_(programming_language) C] and [https://en.wikipedia.org/wiki/C%2B%2B C++], with blocks of code delimited by curly brackets, and control flow and structure. Rust does not use automatic [https://en.wikipedia.org/wiki/Garbage_collection_(computer_science) garbage collection] mechanism similar to [https://en.wikipedia.org/wiki/Java_(programming_language) java]. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms.&lt;br /&gt;
&lt;br /&gt;
== Servo ==&lt;br /&gt;
&lt;br /&gt;
Servo is web browser layout engine developed by Mozilla Research. It was developed in Rust. [https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] handles parallel environments such as rendering, layout, image decoding as a separate tasks. Servo provides [https://en.wikipedia.org/wiki/Application_programming_interface APIs], [https://en.wikipedia.org/wiki/JavaScript JavaScript] support. Servo was not developed explicitly to create full web browser but to achieve maximum parallelism.&lt;br /&gt;
&lt;br /&gt;
== Compilation and Build ==&lt;br /&gt;
&lt;br /&gt;
Servo's build system automatically downloads a snapshot Rust compiler to build itself. This is normally a specific revision of Rust upstream, but sometimes has a backported patch or two.&lt;br /&gt;
&lt;br /&gt;
Code link: https://github.com/servo/servo/ . This repository is forked to https://github.com/ronak6892/servo .&lt;br /&gt;
&lt;br /&gt;
Servo is built with Cargo, the Rust package manager. We also use Mozilla's Mach tools to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
==== Normal build ====&lt;br /&gt;
&lt;br /&gt;
To build Servo in development mode. This is useful for development, but the resulting binary is very slow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/servo/servo&lt;br /&gt;
cd servo&lt;br /&gt;
./mach build --dev&lt;br /&gt;
./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For benchmarking, performance testing, or real-world use, add the --release flag to create an optimized build:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach build --release&lt;br /&gt;
./mach run --release tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Building for Android target ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/servo/servo&lt;br /&gt;
cd servo&lt;br /&gt;
ANDROID_TOOLCHAIN=/path/to/toolchain ANDROID_NDK=/path/to/ndk PATH=$PATH:/path/to/toolchain/bin ./mach build --android&lt;br /&gt;
cd ports/android&lt;br /&gt;
ANDROID_SDK=/path/to/sdk make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rather than setting the ANDROID_* environment variables every time, you can also create a .servobuild file and then edit it to contain the correct paths to the Android SDK/NDK tools:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp servobuild.example .servobuild&lt;br /&gt;
# edit .servobuild&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Running ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach run [url] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
==== Background information ====&lt;br /&gt;
Servo uses a custom HTML5 parser written in Rust, called [https://github.com/servo/html5ever/ HTML5ever]. Servo currently lacks a parser for [https://en.wikipedia.org/wiki/XML XML] documents, which prevents it from running [https://en.wikipedia.org/wiki/XHTML XHTML] tests and implementing APIs that rely on it.&lt;br /&gt;
[https://github.com/Ygg01/xml5ever XML5ever] which is an experimental XML parser that works on a modified specification of XML called XML5, which drops certain properties of XML like well-formedness for better compatibility with HTML and better error recovery. XML5ever is based largely on HTML5ever parser.&lt;br /&gt;
&lt;br /&gt;
==== Goal ====&lt;br /&gt;
The goal of the project is to integrate  XML5ever parser into Servo for parsing of XML documents which is currently not present in Servo. After the project, Servo will differentiate between HTML and XML documents and parse them accordingly using their respective parser which is currently lacking in it.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
To integrate XML5ever, dependency was added for XML5ever parser similar to HTML5ever.A separate interface was defined in ServoXMLParser webidl file and this interface was implemented in its corresponding rust file along with necessary stubs to parse XML. &lt;br /&gt;
The Adapter Design Pattern was applied to enhance parsing mechanism for XML5 in Servo. Interface defined using adapter pattern closely resembles servoHTMLParser interface as this will facilitate parsing or modifying any code for both XML and [https://en.wikipedia.org/wiki/HTML HTML] documents and future reader don't have to understand code for both separately as they are related in their functionality.&lt;br /&gt;
&lt;br /&gt;
== Steps done as part of the OSS Project==&lt;br /&gt;
&lt;br /&gt;
To achieve project goal we have done following initial steps in our OSS project (which have already been merged in Servo's master branch).&lt;br /&gt;
&lt;br /&gt;
* Complied servo and added xml5ever as a dependency to the script crate using cargo package manager. To do this we edited Cargo.toml located at components/script by adding xml5ever as a dependency.&lt;br /&gt;
&lt;br /&gt;
* Added xml.rs at components/script/parse with parse_xml() as a function. Declared xml as public module in mod.rs in order to declare file.&lt;br /&gt;
&lt;br /&gt;
* declared an empty ServoXMLParser interface in a [https://en.wikipedia.org/wiki/Web_IDL webidl] file located at located at components/script/dom/webidls.&lt;br /&gt;
&lt;br /&gt;
* Implemented ServoXMLParser interface with necessary stubs in servoxmlparser.rs located at components/script/dom. Also declared servoxmlparser as public module in mod.rs located at components/script/dom.&lt;br /&gt;
&lt;br /&gt;
* Called parse_xml from domparser.rs located at components/script/dom this will help compile.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
* Modify Script::load in scipt_task.rs to check whether document being parsed is of type text/xml. When content type of the document is text/xml, parse_xml method which we was defined in OSS project will be called. Earlier it called parse_html for all the documents but now since we are integrating the XML parser, it will call parse_xml instead of parse_html, while passing the appropriate flag to the Document constructor.&lt;br /&gt;
* Implementing a TreeSink for the XML parser which will pick nodes from XML document and append them to XML tree in the hierarchy. Serializable module also needs to be implemented in order to implement TreeSink. &lt;br /&gt;
* Support for XML document responses needs to be implemented. In this step,response Document and its MIME type needs to be checked and if either one of them is null then function will return null otherwise if MIME type is text/html then its charset will be checked and if its null then set it will be set to UTF-8 and if MIME type is text/xml then document will be defined as a Document that represents the result of running the XML parser with XML scripting support disabled on bytes. At the end of this step based on above condition,document’s encoding will be set to charset, content type to final MIME type and url to document’s URL and this response document object will be returned.&lt;br /&gt;
* Implement XMLDocument API:&lt;br /&gt;
# adding the new IDL file at components/script/dom/webidls/XMLDocument.webidl;&lt;br /&gt;
# creating components/script/dom/XMLDocument.rs;&lt;br /&gt;
# listing XMLDocument .rs in components/script/dom/mod.rs;&lt;br /&gt;
# defining the DOM struct XMLDocument with a #[dom_struct] attribute, a superclass or Reflector member, and other members as appropriate;&lt;br /&gt;
# implementing the dom::bindings::codegen::Bindings::XMLDocumentBindings::XMLDocumentMethods trait for &amp;amp;'a XMLDocument.&lt;br /&gt;
# In XMLDocument.webidl file, implement the load method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  partial interface XMLDocument {&lt;br /&gt;
	boolean load(DOMString url);&lt;br /&gt;
  };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The load(url) method will check and validate url specified in the method call and set readiness of current document to &amp;quot;loading&amp;quot;. It will then start a request-response flow in which it will initiate a request with destination as sub-resource and its response will be result of the fetched request. If this response's Content-Type metadata is an XML MIME type then it will create a new XML parser associated with result document and pass this parser responses' body and success set to true and readiness of this document will be set to &amp;quot;Complete&amp;quot;. At the end, it will replace all children of document by the children of the result followed by mutation events so the XML document gets loaded.&lt;br /&gt;
&lt;br /&gt;
== Challenges ==&lt;br /&gt;
&lt;br /&gt;
Primary challenge in this project is to continuously sync with the latest commits of servo and ensuring build success after integrating each step. Adding necessary stubs in the newly added files as per the changes in parsing mechanism will also need continuous and careful efforts. Parsing of XML document incorporates many input arguments so error checking for all the edge cases will also be a challenge while implementing TreeSink and support for XML HttpRequest.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
To integrate the model of XML parser into current servo code, no extra test cases were added. We have added interface files and method stubs, XML parser functionality will be implemented as subsequent steps in final project. Integration success is tested by successful compilation and build after adding our changes. Following commands are used to check that all test cases were passed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
./mach test-tidy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the modifications which were suggested by servo community through comments on pull request, have been incorporated and pull request has been merged successfully.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
Servo Documentation - http://doc.servo.org/servo/index.html&lt;br /&gt;
&lt;br /&gt;
Project Definition - https://github.com/servo/servo/wiki/Integrate-xml5ever&lt;br /&gt;
&lt;br /&gt;
Rust Documentation - https://doc.rust-lang.org/nightly/index.html&lt;br /&gt;
&lt;br /&gt;
XML specs - https://xhr.spec.whatwg.org/#document-response&lt;br /&gt;
&lt;br /&gt;
YouTube - https://youtu.be/i8dONOzYwlc&lt;/div&gt;</summary>
		<author><name>Jsharda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_M1503_Integrate_xml5ever_XML_parser&amp;diff=99729</id>
		<title>CSC/ECE 517 Fall 2015 M1503 Integrate xml5ever XML parser</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_M1503_Integrate_xml5ever_XML_parser&amp;diff=99729"/>
		<updated>2015-11-13T23:42:13Z</updated>

		<summary type="html">&lt;p&gt;Jsharda: Summarized function of load method for XML Document&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rust ==&lt;br /&gt;
&lt;br /&gt;
Rust is a general-purpose, compiled programming language developed by [https://en.wikipedia.org/wiki/Mozilla Mozilla Research]. The syntax of [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] is somewhat  similar to [https://en.wikipedia.org/wiki/C_(programming_language) C] and [https://en.wikipedia.org/wiki/C%2B%2B C++], with blocks of code delimited by curly brackets, and control flow and structure. Rust does not use automatic [https://en.wikipedia.org/wiki/Garbage_collection_(computer_science) garbage collection] mechanism similar to [https://en.wikipedia.org/wiki/Java_(programming_language) java]. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms.&lt;br /&gt;
&lt;br /&gt;
== Servo ==&lt;br /&gt;
&lt;br /&gt;
Servo is web browser layout engine developed by Mozilla Research. It was developed in Rust. [https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] handles parallel environments such as rendering, layout, image decoding as a separate tasks. Servo provides [https://en.wikipedia.org/wiki/Application_programming_interface APIs], [https://en.wikipedia.org/wiki/JavaScript JavaScript] support. Servo was not developed explicitly to create full web browser but to achieve maximum parallelism.&lt;br /&gt;
&lt;br /&gt;
== Compilation and Build ==&lt;br /&gt;
&lt;br /&gt;
Servo's build system automatically downloads a snapshot Rust compiler to build itself. This is normally a specific revision of Rust upstream, but sometimes has a backported patch or two.&lt;br /&gt;
&lt;br /&gt;
Code link: https://github.com/servo/servo/ . This repository is forked to https://github.com/ronak6892/servo .&lt;br /&gt;
&lt;br /&gt;
Servo is built with Cargo, the Rust package manager. We also use Mozilla's Mach tools to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
==== Normal build ====&lt;br /&gt;
&lt;br /&gt;
To build Servo in development mode. This is useful for development, but the resulting binary is very slow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/servo/servo&lt;br /&gt;
cd servo&lt;br /&gt;
./mach build --dev&lt;br /&gt;
./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For benchmarking, performance testing, or real-world use, add the --release flag to create an optimized build:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach build --release&lt;br /&gt;
./mach run --release tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Building for Android target ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/servo/servo&lt;br /&gt;
cd servo&lt;br /&gt;
ANDROID_TOOLCHAIN=/path/to/toolchain ANDROID_NDK=/path/to/ndk PATH=$PATH:/path/to/toolchain/bin ./mach build --android&lt;br /&gt;
cd ports/android&lt;br /&gt;
ANDROID_SDK=/path/to/sdk make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rather than setting the ANDROID_* environment variables every time, you can also create a .servobuild file and then edit it to contain the correct paths to the Android SDK/NDK tools:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp servobuild.example .servobuild&lt;br /&gt;
# edit .servobuild&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Running ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach run [url] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
==== Background information ====&lt;br /&gt;
Servo uses a custom HTML5 parser written in Rust, called [https://github.com/servo/html5ever/ HTML5ever]. Servo currently lacks a parser for [https://en.wikipedia.org/wiki/XML XML] documents, which prevents it from running [https://en.wikipedia.org/wiki/XHTML XHTML] tests and implementing APIs that rely on it.&lt;br /&gt;
[https://github.com/Ygg01/xml5ever XML5ever] which is an experimental XML parser that works on a modified specification of XML called XML5, which drops certain properties of XML like well-formedness for better compatibility with HTML and better error recovery. XML5ever is based largely on HTML5ever parser.&lt;br /&gt;
&lt;br /&gt;
==== Goal ====&lt;br /&gt;
The goal of the project is to integrate  XML5ever parser into Servo for parsing of XML documents which is currently not present in Servo. After the project, Servo will differentiate between HTML and XML documents and parse them accordingly using their respective parser which is currently lacking in it.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
To integrate XML5ever, dependency was added for XML5ever parser similar to HTML5ever.A separate interface was defined in ServoXMLParser webidl file and this interface was implemented in its corresponding rust file along with necessary stubs to parse XML. &lt;br /&gt;
The Adapter Design Pattern was applied to enhance parsing mechanism for XML5 in Servo. Interface defined using adapter pattern closely resembles servoHTMLParser interface as this will facilitate parsing or modifying any code for both XML and [https://en.wikipedia.org/wiki/HTML HTML] documents and future reader don't have to understand code for both separately as they are related in their functionality.&lt;br /&gt;
&lt;br /&gt;
== Steps done as part of the OSS Project==&lt;br /&gt;
&lt;br /&gt;
To achieve project goal we have done following initial steps in our OSS project (which have already been merged in Servo's master branch).&lt;br /&gt;
&lt;br /&gt;
* Complied servo and added xml5ever as a dependency to the script crate using cargo package manager. To do this we edited Cargo.toml located at components/script by adding xml5ever as a dependency.&lt;br /&gt;
&lt;br /&gt;
* Added xml.rs at components/script/parse with parse_xml() as a function. Declared xml as public module in mod.rs in order to declare file.&lt;br /&gt;
&lt;br /&gt;
* declared an empty ServoXMLParser interface in a [https://en.wikipedia.org/wiki/Web_IDL webidl] file located at located at components/script/dom/webidls.&lt;br /&gt;
&lt;br /&gt;
* Implemented ServoXMLParser interface with necessary stubs in servoxmlparser.rs located at components/script/dom. Also declared servoxmlparser as public module in mod.rs located at components/script/dom.&lt;br /&gt;
&lt;br /&gt;
* Called parse_xml from domparser.rs located at components/script/dom this will help compile.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
* Modify Script::load in scipt_task.rs to check whether document being parsed is of type text/xml. When content type of the document is text/xml, parse_xml method which we was defined in OSS project will be called. Earlier it called parse_html for all the documents but now since we are integrating the XML parser, it will call parse_xml instead of parse_html, while passing the appropriate flag to the Document constructor.&lt;br /&gt;
* Implementing a TreeSink for the XML parser which will pick nodes from XML document and append them to XML tree in the hierarchy. Serializable module also needs to be implemented in order to implement TreeSink. &lt;br /&gt;
* Support for XML document responses needs to be implemented. In this step,response Document and its MIME type needs to be checked and if either one of them is null then function will return null otherwise if MIME type is text/html then its charset will be checked and if its null then set it will be set to UTF-8 and if MIME type is text/xml then document will be defined as a Document that represents the result of running the XML parser with XML scripting support disabled on bytes. At the end of this step based on above condition,document’s encoding will be set to charset, content type to final MIME type and url to document’s URL and this response document object will be returned.&lt;br /&gt;
* Implement XMLDocument API:&lt;br /&gt;
# adding the new IDL file at components/script/dom/webidls/XMLDocument.webidl;&lt;br /&gt;
# creating components/script/dom/XMLDocument.rs;&lt;br /&gt;
# listing XMLDocument .rs in components/script/dom/mod.rs;&lt;br /&gt;
# defining the DOM struct XMLDocument with a #[dom_struct] attribute, a superclass or Reflector member, and other members as appropriate;&lt;br /&gt;
# implementing the dom::bindings::codegen::Bindings::XMLDocumentBindings::XMLDocumentMethods trait for &amp;amp;'a XMLDocument.&lt;br /&gt;
# In XMLDocument.webidl file, implement the load method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  partial interface XMLDocument {&lt;br /&gt;
	boolean load(DOMString url);&lt;br /&gt;
  };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The load(url) method will check and validate url specified in the method call and set readiness of current document to &amp;quot;loading&amp;quot;. It will then start a request-response flow in which it will initiate a request with destination as sub-resource and its response will be result of the fetched request. If this response's Content-Type metadata is an XML MIME type then it will create a new XML parser associated with result document and pass this parser responses' body and success set to true and readiness of this document will be set to &amp;quot;Complete&amp;quot;. At the end, it will replace all children of document by the children of the result followed by mutation events so the XML document gets loaded.&lt;br /&gt;
&lt;br /&gt;
== Challenges ==&lt;br /&gt;
&lt;br /&gt;
Primary challenge is to continuously sync with the latest commits of servo and ensuring build success after integrating each step. And keep on adding of necessary stubs as per the new changes in parsing mechanism also need continuous and careful efforts.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
To integrate the model of XML parser into current servo code, no extra test cases were added. We have added interface files and method stubs, XML parser functionality will be implemented as subsequent steps in final project. Integration success is tested by successful compilation and build after adding our changes. Following commands are used to check that all test cases were passed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
./mach test-tidy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the modifications which were suggested by servo community through comments on pull request, have been incorporated and pull request has been merged successfully.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
Servo Documentation - http://doc.servo.org/servo/index.html&lt;br /&gt;
&lt;br /&gt;
Project Definition - https://github.com/servo/servo/wiki/Integrate-xml5ever&lt;br /&gt;
&lt;br /&gt;
Rust Documentation - https://doc.rust-lang.org/nightly/index.html&lt;br /&gt;
&lt;br /&gt;
XML specs - https://xhr.spec.whatwg.org/#document-response&lt;br /&gt;
&lt;br /&gt;
YouTube - https://youtu.be/i8dONOzYwlc&lt;/div&gt;</summary>
		<author><name>Jsharda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_M1503_Integrate_xml5ever_XML_parser&amp;diff=99719</id>
		<title>CSC/ECE 517 Fall 2015 M1503 Integrate xml5ever XML parser</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_M1503_Integrate_xml5ever_XML_parser&amp;diff=99719"/>
		<updated>2015-11-13T23:15:06Z</updated>

		<summary type="html">&lt;p&gt;Jsharda: Edit in Implementation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rust ==&lt;br /&gt;
&lt;br /&gt;
Rust is a general-purpose, compiled programming language developed by [https://en.wikipedia.org/wiki/Mozilla Mozilla Research]. The syntax of [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] is somewhat  similar to [https://en.wikipedia.org/wiki/C_(programming_language) C] and [https://en.wikipedia.org/wiki/C%2B%2B C++], with blocks of code delimited by curly brackets, and control flow and structure. Rust does not use automatic [https://en.wikipedia.org/wiki/Garbage_collection_(computer_science) garbage collection] mechanism similar to [https://en.wikipedia.org/wiki/Java_(programming_language) java]. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms.&lt;br /&gt;
&lt;br /&gt;
== Servo ==&lt;br /&gt;
&lt;br /&gt;
Servo is web browser layout engine developed by Mozilla Research. It was developed in Rust. [https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] handles parallel environments such as rendering, layout, image decoding as a separate tasks. Servo provides [https://en.wikipedia.org/wiki/Application_programming_interface APIs], [https://en.wikipedia.org/wiki/JavaScript JavaScript] support. Servo was not developed explicitly to create full web browser but to achieve maximum parallelism.&lt;br /&gt;
&lt;br /&gt;
== Compilation and Build ==&lt;br /&gt;
&lt;br /&gt;
Servo's build system automatically downloads a snapshot Rust compiler to build itself. This is normally a specific revision of Rust upstream, but sometimes has a backported patch or two.&lt;br /&gt;
&lt;br /&gt;
Code link: https://github.com/servo/servo/ . This repository is forked to https://github.com/ronak6892/servo .&lt;br /&gt;
&lt;br /&gt;
Servo is built with Cargo, the Rust package manager. We also use Mozilla's Mach tools to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
==== Normal build ====&lt;br /&gt;
&lt;br /&gt;
To build Servo in development mode. This is useful for development, but the resulting binary is very slow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/servo/servo&lt;br /&gt;
cd servo&lt;br /&gt;
./mach build --dev&lt;br /&gt;
./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For benchmarking, performance testing, or real-world use, add the --release flag to create an optimized build:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach build --release&lt;br /&gt;
./mach run --release tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Building for Android target ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/servo/servo&lt;br /&gt;
cd servo&lt;br /&gt;
ANDROID_TOOLCHAIN=/path/to/toolchain ANDROID_NDK=/path/to/ndk PATH=$PATH:/path/to/toolchain/bin ./mach build --android&lt;br /&gt;
cd ports/android&lt;br /&gt;
ANDROID_SDK=/path/to/sdk make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rather than setting the ANDROID_* environment variables every time, you can also create a .servobuild file and then edit it to contain the correct paths to the Android SDK/NDK tools:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp servobuild.example .servobuild&lt;br /&gt;
# edit .servobuild&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Running ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach run [url] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
==== Background information ====&lt;br /&gt;
Servo uses a custom HTML5 parser written in Rust, called [https://github.com/servo/html5ever/ HTML5ever]. Servo currently lacks a parser for [https://en.wikipedia.org/wiki/XML XML] documents, which prevents it from running [https://en.wikipedia.org/wiki/XHTML XHTML] tests and implementing APIs that rely on it.&lt;br /&gt;
[https://github.com/Ygg01/xml5ever XML5ever] which is an experimental XML parser that works on a modified specification of XML called XML5, which drops certain properties of XML like well-formedness for better compatibility with HTML and better error recovery. XML5ever is based largely on HTML5ever parser.&lt;br /&gt;
&lt;br /&gt;
==== Goal ====&lt;br /&gt;
The goal of the project is to integrate  XML5ever parser into Servo for parsing of XML documents which is currently not present in Servo. After the project, Servo will differentiate between HTML and XML documents and parse them accordingly using their respective parser which is currently lacking in it.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
To integrate XML5ever, dependency was added for XML5ever parser similar to HTML5ever.A separate interface was defined in ServoXMLParser webidl file and this interface was implemented in its corresponding rust file along with necessary stubs to parse XML. &lt;br /&gt;
The Adapter Design Pattern was applied to enhance parsing mechanism for XML5 in Servo. Interface defined using adapter pattern closely resembles servoHTMLParser interface as this will facilitate parsing or modifying any code for both XML and [https://en.wikipedia.org/wiki/HTML HTML] documents and future reader don't have to understand code for both separately as they are related in their functionality.&lt;br /&gt;
&lt;br /&gt;
== Steps done as part of the OSS Project==&lt;br /&gt;
&lt;br /&gt;
To achieve project goal we have done following initial steps in our OSS project (which have already been merged in Servo's master branch).&lt;br /&gt;
&lt;br /&gt;
* Complied servo and added xml5ever as a dependency to the script crate using cargo package manager. To do this we edited Cargo.toml located at components/script by adding xml5ever as a dependency.&lt;br /&gt;
&lt;br /&gt;
* Added xml.rs at components/script/parse with parse_xml() as a function. Declared xml as public module in mod.rs in order to declare file.&lt;br /&gt;
&lt;br /&gt;
* declared an empty ServoXMLParser interface in a [https://en.wikipedia.org/wiki/Web_IDL webidl] file located at located at components/script/dom/webidls.&lt;br /&gt;
&lt;br /&gt;
* Implemented ServoXMLParser interface with necessary stubs in servoxmlparser.rs located at components/script/dom. Also declared servoxmlparser as public module in mod.rs located at components/script/dom.&lt;br /&gt;
&lt;br /&gt;
* Called parse_xml from domparser.rs located at components/script/dom this will help compile.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
* Modify Script::load in scipt_task.rs to check whether document being parsed is of type text/xml. When content type of the document is text/xml, parse_xml method which we was defined in OSS project will be called. Earlier it called parse_html for all the documents but now since we are integrating the XML parser, it will call parse_xml instead of parse_html, while passing the appropriate flag to the Document constructor.&lt;br /&gt;
* Implementing a TreeSink for the XML parser which will pick nodes from XML document and append them to XML tree in the hierarchy. Serializable module also needs to be implemented in order to implement TreeSink. &lt;br /&gt;
* Support for XML document responses needs to be implemented. In this step,response Document and its MIME type needs to be checked and if either one of them is null then function will return null otherwise if MIME type is text/html then its charset will be checked and if its null then set it will be set to UTF-8 and if MIME type is text/xml then document will be defined as a Document that represents the result of running the XML parser with XML scripting support disabled on bytes. At the end of this step based on above condition,document’s encoding will be set to charset, content type to final MIME type and url to document’s URL and this response document object will be returned.&lt;br /&gt;
* Implement XMLDocument API:&lt;br /&gt;
# adding the new IDL file at components/script/dom/webidls/XMLDocument.webidl;&lt;br /&gt;
# creating components/script/dom/XMLDocument.rs;&lt;br /&gt;
# listing XMLDocument .rs in components/script/dom/mod.rs;&lt;br /&gt;
# defining the DOM struct XMLDocument with a #[dom_struct] attribute, a superclass or Reflector member, and other members as appropriate;&lt;br /&gt;
# implementing the dom::bindings::codegen::Bindings::XMLDocumentBindings::XMLDocumentMethods trait for &amp;amp;'a XMLDocument.&lt;br /&gt;
# In XMLDocument.webidl file, implement the load method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  partial interface XMLDocument {&lt;br /&gt;
	boolean load(DOMString url);&lt;br /&gt;
  };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The load(url) method must run the following steps:&lt;br /&gt;
# Let document be the XMLDocument object on which the method was invoked.&lt;br /&gt;
# Resolve the method's first argument, relative to the API base URL specified by the entry settings object. If this is not successful, throw a SyntaxError         exception and abort these steps. Otherwise, let url be the resulting absolute URL.&lt;br /&gt;
# If the origin of url is not the same as the origin of document, throw a SecurityError exception and abort these steps.&lt;br /&gt;
# Remove all child nodes of document, without firing any mutation events.&lt;br /&gt;
# Set the current document readiness of document to &amp;quot;loading&amp;quot;.&lt;br /&gt;
# Run the remainder of these steps in parallel, and return true from the method.&lt;br /&gt;
# Let result be a Document object.&lt;br /&gt;
# Let success be false.&lt;br /&gt;
# Let request be a new request whose url is url, client is entry settings object, destination is &amp;quot;subresource&amp;quot;, synchronous flag is set, mode is &amp;quot;same- 1.   origin&amp;quot;, credentials mode is &amp;quot;same-origin&amp;quot;, and whose use-URL-credentials flag is set.&lt;br /&gt;
# Let response be the result of fetching request.&lt;br /&gt;
# If response's Content-Type metadata is an XML MIME type, then run these substeps:&lt;br /&gt;
## Create a new XML parser associated with the result document.&lt;br /&gt;
## Pass this parser response's body.&lt;br /&gt;
## If there is an XML well-formedness or XML namespace well-formedness error, then remove all child nodes from result. Otherwise let success be true.&lt;br /&gt;
# Queue a task to run the following steps.&lt;br /&gt;
## Set the current document readiness of document to &amp;quot;complete&amp;quot;.&lt;br /&gt;
## Replace all the children of document by the children of result (even if it has no children), firing mutation events as if a DocumentFragment containing the new children had been inserted.&lt;br /&gt;
## Fire a simple event named load at document.&lt;br /&gt;
&lt;br /&gt;
== Challenges ==&lt;br /&gt;
&lt;br /&gt;
Primary challenge is to continuously sync with the latest commits of servo and ensuring build success after integrating each step. And keep on adding of necessary stubs as per the new changes in parsing mechanism also need continuous and careful efforts.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
To integrate the model of XML parser into current servo code, no extra test cases were added. We have added interface files and method stubs, XML parser functionality will be implemented as subsequent steps in final project. Integration success is tested by successful compilation and build after adding our changes. Following commands are used to check that all test cases were passed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
./mach test-tidy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the modifications which were suggested by servo community through comments on pull request, have been incorporated and pull request has been merged successfully.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
Servo Documentation - http://doc.servo.org/servo/index.html&lt;br /&gt;
&lt;br /&gt;
Project Definition - https://github.com/servo/servo/wiki/Integrate-xml5ever&lt;br /&gt;
&lt;br /&gt;
Rust Documentation - https://doc.rust-lang.org/nightly/index.html&lt;br /&gt;
&lt;br /&gt;
XML specs - https://xhr.spec.whatwg.org/#document-response&lt;br /&gt;
&lt;br /&gt;
YouTube - https://youtu.be/i8dONOzYwlc&lt;/div&gt;</summary>
		<author><name>Jsharda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_M1503_Integrate_xml5ever_XML_parser&amp;diff=99593</id>
		<title>CSC/ECE 517 Fall 2015 M1503 Integrate xml5ever XML parser</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_M1503_Integrate_xml5ever_XML_parser&amp;diff=99593"/>
		<updated>2015-11-13T20:22:37Z</updated>

		<summary type="html">&lt;p&gt;Jsharda: Fixed Link for webidl&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rust ==&lt;br /&gt;
&lt;br /&gt;
Rust is a general-purpose, compiled programming language developed by [https://en.wikipedia.org/wiki/Mozilla Mozilla Research]. The syntax of [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] is somewhat  similar to [https://en.wikipedia.org/wiki/C_(programming_language) C] and [https://en.wikipedia.org/wiki/C%2B%2B C++], with blocks of code delimited by curly brackets, and control flow and structure. Rust does not use automatic [https://en.wikipedia.org/wiki/Garbage_collection_(computer_science) garbage collection] mechanism similar to [https://en.wikipedia.org/wiki/Java_(programming_language) java]. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms.&lt;br /&gt;
&lt;br /&gt;
== Servo ==&lt;br /&gt;
&lt;br /&gt;
Servo is web browser layout engine developed by Mozilla Research. It was developed in Rust. [https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] handles parallel environments such as rendering, layout, image decoding as a separate tasks. Servo provides [https://en.wikipedia.org/wiki/Application_programming_interface APIs], [https://en.wikipedia.org/wiki/JavaScript JavaScript] support. Servo was not developed explicitly to create full web browser but to achieve maximum parallelism.&lt;br /&gt;
&lt;br /&gt;
== Compilation and Build ==&lt;br /&gt;
&lt;br /&gt;
Servo's build system automatically downloads a snapshot Rust compiler to build itself. This is normally a specific revision of Rust upstream, but sometimes has a backported patch or two.&lt;br /&gt;
&lt;br /&gt;
Code link: https://github.com/servo/servo/ . This repository is forked to https://github.com/ronak6892/servo .&lt;br /&gt;
&lt;br /&gt;
Servo is built with Cargo, the Rust package manager. We also use Mozilla's Mach tools to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
==== Normal build ====&lt;br /&gt;
&lt;br /&gt;
To build Servo in development mode. This is useful for development, but the resulting binary is very slow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/servo/servo&lt;br /&gt;
cd servo&lt;br /&gt;
./mach build --dev&lt;br /&gt;
./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For benchmarking, performance testing, or real-world use, add the --release flag to create an optimized build:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach build --release&lt;br /&gt;
./mach run --release tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Building for Android target ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/servo/servo&lt;br /&gt;
cd servo&lt;br /&gt;
ANDROID_TOOLCHAIN=/path/to/toolchain ANDROID_NDK=/path/to/ndk PATH=$PATH:/path/to/toolchain/bin ./mach build --android&lt;br /&gt;
cd ports/android&lt;br /&gt;
ANDROID_SDK=/path/to/sdk make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rather than setting the ANDROID_* environment variables every time, you can also create a .servobuild file and then edit it to contain the correct paths to the Android SDK/NDK tools:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp servobuild.example .servobuild&lt;br /&gt;
# edit .servobuild&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Running ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach run [url] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
==== Background information ====&lt;br /&gt;
Servo uses a custom HTML5 parser written in Rust, called [https://github.com/servo/html5ever/ HTML5ever]. Servo currently lacks a parser for [https://en.wikipedia.org/wiki/XML XML] documents, which prevents it from running [https://en.wikipedia.org/wiki/XHTML XHTML] tests and implementing APIs that rely on it.&lt;br /&gt;
[https://github.com/Ygg01/xml5ever XML5ever] which is an experimental XML parser that works on a modified specification of XML called XML5, which drops certain properties of XML like well-formedness for better compatibility with HTML and better error recovery. XML5ever is based largely on HTML5ever parser.&lt;br /&gt;
&lt;br /&gt;
==== Goal ====&lt;br /&gt;
The goal of the project is to integrate  XML5ever parser into Servo for parsing of XML documents which is currently not present in Servo. After the project, Servo will differentiate between HTML and XML documents and parse them accordingly using their respective parser which is currently lacking in it.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
To integrate XML5ever, dependency was added for XML5ever parser similar to HTML5ever.A separate interface was defined in ServoXMLParser webidl file and this interface was implemented in its corresponding rust file along with necessary stubs to parse XML. &lt;br /&gt;
The Adapter Design Pattern was applied to enhance parsing mechanism for XML5 in Servo. Interface defined using adapter pattern closely resembles servoHTMLParser interface as this will facilitate parsing or modifying any code for both XML and [https://en.wikipedia.org/wiki/HTML HTML] documents and future reader don't have to understand code for both separately as they are related in their functionality.&lt;br /&gt;
&lt;br /&gt;
== Steps done as part of the OSS Project==&lt;br /&gt;
&lt;br /&gt;
To achieve project goal we have done following initial steps in our OSS project (which have already been merged in Servo's master branch).&lt;br /&gt;
&lt;br /&gt;
* Complied servo and added xml5ever as a dependency to the script crate using cargo package manager. To do this we edited Cargo.toml located at components/script by adding xml5ever as a dependency.&lt;br /&gt;
&lt;br /&gt;
* Added xml.rs at components/script/parse with parse_xml() as a function. Declared xml as public module in mod.rs in order to declare file.&lt;br /&gt;
&lt;br /&gt;
* declared an empty ServoXMLParser interface in a [https://en.wikipedia.org/wiki/Web_IDL webidl] file located at located at components/script/dom/webidls.&lt;br /&gt;
&lt;br /&gt;
* Implemented ServoXMLParser interface with necessary stubs in servoxmlparser.rs located at components/script/dom. Also declared servoxmlparser as public module in mod.rs located at components/script/dom.&lt;br /&gt;
&lt;br /&gt;
* Called parse_xml from domparser.rs located at components/script/dom this will help compile.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
* Modify Script::load in scipt_task.rs to check whether documents we are parsing isof type text/xml. We the content type of the document is text/xml then we have to call parse_xml which we defined in OSS project. Earlier it called parse_html for all the documents but now since we are integrating the XML parser, it will call parse_xml instead of parse_html as appropriate, while passing the appropriate flag to the Document constructor.&lt;br /&gt;
* Implement a TreeSink for the XML parser which will pick nodes from XML document and append them to XML tree in the hierarchy. Serializable module also needs to be implemented in order to implement TeeSink. &lt;br /&gt;
* Support for XML document responses needs to be implemented. We will check the response Document and its MIME type. If either one of them is null then function will return null. Otherwise if MIME type is text/html then we will check its charset and if its null then set it to UTF-8 and if MIME type is text/xml then we will define document to be a Document that represents the result of running the XML parser with XML scripting support disabled on bytes. At the end end we will set document’s encoding to charset, content type to final MIME type and url to document’s URL and return response document object.&lt;br /&gt;
* Implement XMLDocument API:&lt;br /&gt;
# adding the new IDL file at components/script/dom/webidls/XMLDocument.webidl;&lt;br /&gt;
# creating components/script/dom/XMLDocument.rs;&lt;br /&gt;
# listing XMLDocument .rs in components/script/dom/mod.rs;&lt;br /&gt;
# defining the DOM struct XMLDocument with a #[dom_struct] attribute, a superclass or Reflector member, and other members as appropriate;&lt;br /&gt;
# implementing the dom::bindings::codegen::Bindings::XMLDocumentBindings::XMLDocumentMethods trait for &amp;amp;'a XMLDocument.&lt;br /&gt;
# In XMLDocument.webidl file, implement the load method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  partial interface XMLDocument {&lt;br /&gt;
	boolean load(DOMString url);&lt;br /&gt;
  };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The load(url) method must run the following steps:&lt;br /&gt;
# Let document be the XMLDocument object on which the method was invoked.&lt;br /&gt;
# Resolve the method's first argument, relative to the API base URL specified by the entry settings object. If this is not successful, throw a SyntaxError         exception and abort these steps. Otherwise, let url be the resulting absolute URL.&lt;br /&gt;
# If the origin of url is not the same as the origin of document, throw a SecurityError exception and abort these steps.&lt;br /&gt;
# Remove all child nodes of document, without firing any mutation events.&lt;br /&gt;
# Set the current document readiness of document to &amp;quot;loading&amp;quot;.&lt;br /&gt;
# Run the remainder of these steps in parallel, and return true from the method.&lt;br /&gt;
# Let result be a Document object.&lt;br /&gt;
# Let success be false.&lt;br /&gt;
# Let request be a new request whose url is url, client is entry settings object, destination is &amp;quot;subresource&amp;quot;, synchronous flag is set, mode is &amp;quot;same- 1.   origin&amp;quot;, credentials mode is &amp;quot;same-origin&amp;quot;, and whose use-URL-credentials flag is set.&lt;br /&gt;
# Let response be the result of fetching request.&lt;br /&gt;
# If response's Content-Type metadata is an XML MIME type, then run these substeps:&lt;br /&gt;
## Create a new XML parser associated with the result document.&lt;br /&gt;
## Pass this parser response's body.&lt;br /&gt;
## If there is an XML well-formedness or XML namespace well-formedness error, then remove all child nodes from result. Otherwise let success be true.&lt;br /&gt;
# Queue a task to run the following steps.&lt;br /&gt;
## Set the current document readiness of document to &amp;quot;complete&amp;quot;.&lt;br /&gt;
## Replace all the children of document by the children of result (even if it has no children), firing mutation events as if a DocumentFragment containing the new children had been inserted.&lt;br /&gt;
## Fire a simple event named load at document.&lt;br /&gt;
&lt;br /&gt;
== Challenges ==&lt;br /&gt;
&lt;br /&gt;
Primary challenge is to continuously sync with the latest commits of servo and ensuring build success after integrating each step. And keep on adding of necessary stubs as per the new changes in parsing mechanism also need continuous and careful efforts.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
To integrate the model of XML parser into current servo code, no extra test cases were added. We have added interface files and method stubs, XML parser functionality will be implemented as subsequent steps in final project. Integration success is tested by successful compilation and build after adding our changes. Following commands are used to check that all test cases were passed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
./mach test-tidy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the modifications which were suggested by servo community through comments on pull request, have been incorporated and pull request has been merged successfully.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
Servo Documentation - http://doc.servo.org/servo/index.html&lt;br /&gt;
&lt;br /&gt;
Project Definition - https://github.com/servo/servo/wiki/Integrate-xml5ever&lt;br /&gt;
&lt;br /&gt;
Rust Documentation - https://doc.rust-lang.org/nightly/index.html&lt;br /&gt;
&lt;br /&gt;
XML specs - https://xhr.spec.whatwg.org/#document-response&lt;br /&gt;
&lt;br /&gt;
YouTube - https://youtu.be/i8dONOzYwlc&lt;/div&gt;</summary>
		<author><name>Jsharda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_M1503_Integrate_xml5ever_XML_parser&amp;diff=99592</id>
		<title>CSC/ECE 517 Fall 2015 M1503 Integrate xml5ever XML parser</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_M1503_Integrate_xml5ever_XML_parser&amp;diff=99592"/>
		<updated>2015-11-13T20:21:30Z</updated>

		<summary type="html">&lt;p&gt;Jsharda: Fixed Link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rust ==&lt;br /&gt;
&lt;br /&gt;
Rust is a general-purpose, compiled programming language developed by [https://en.wikipedia.org/wiki/Mozilla Mozilla Research]. The syntax of [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] is somewhat  similar to [https://en.wikipedia.org/wiki/C_(programming_language) C] and [https://en.wikipedia.org/wiki/C%2B%2B C++], with blocks of code delimited by curly brackets, and control flow and structure. Rust does not use automatic [https://en.wikipedia.org/wiki/Garbage_collection_(computer_science) garbage collection] mechanism similar to [https://en.wikipedia.org/wiki/Java_(programming_language) java]. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms.&lt;br /&gt;
&lt;br /&gt;
== Servo ==&lt;br /&gt;
&lt;br /&gt;
Servo is web browser layout engine developed by Mozilla Research. It was developed in Rust. [https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] handles parallel environments such as rendering, layout, image decoding as a separate tasks. Servo provides [https://en.wikipedia.org/wiki/Application_programming_interface APIs], [https://en.wikipedia.org/wiki/JavaScript JavaScript] support. Servo was not developed explicitly to create full web browser but to achieve maximum parallelism.&lt;br /&gt;
&lt;br /&gt;
== Compilation and Build ==&lt;br /&gt;
&lt;br /&gt;
Servo's build system automatically downloads a snapshot Rust compiler to build itself. This is normally a specific revision of Rust upstream, but sometimes has a backported patch or two.&lt;br /&gt;
&lt;br /&gt;
Code link: https://github.com/servo/servo/ . This repository is forked to https://github.com/ronak6892/servo .&lt;br /&gt;
&lt;br /&gt;
Servo is built with Cargo, the Rust package manager. We also use Mozilla's Mach tools to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
==== Normal build ====&lt;br /&gt;
&lt;br /&gt;
To build Servo in development mode. This is useful for development, but the resulting binary is very slow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/servo/servo&lt;br /&gt;
cd servo&lt;br /&gt;
./mach build --dev&lt;br /&gt;
./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For benchmarking, performance testing, or real-world use, add the --release flag to create an optimized build:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach build --release&lt;br /&gt;
./mach run --release tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Building for Android target ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/servo/servo&lt;br /&gt;
cd servo&lt;br /&gt;
ANDROID_TOOLCHAIN=/path/to/toolchain ANDROID_NDK=/path/to/ndk PATH=$PATH:/path/to/toolchain/bin ./mach build --android&lt;br /&gt;
cd ports/android&lt;br /&gt;
ANDROID_SDK=/path/to/sdk make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rather than setting the ANDROID_* environment variables every time, you can also create a .servobuild file and then edit it to contain the correct paths to the Android SDK/NDK tools:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp servobuild.example .servobuild&lt;br /&gt;
# edit .servobuild&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Running ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach run [url] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
==== Background information ====&lt;br /&gt;
Servo uses a custom HTML5 parser written in Rust, called [https://github.com/servo/html5ever/ HTML5ever]. Servo currently lacks a parser for [https://en.wikipedia.org/wiki/XML XML] documents, which prevents it from running [https://en.wikipedia.org/wiki/XHTML XHTML] tests and implementing APIs that rely on it.&lt;br /&gt;
[https://github.com/Ygg01/xml5ever XML5ever] which is an experimental XML parser that works on a modified specification of XML called XML5, which drops certain properties of XML like well-formedness for better compatibility with HTML and better error recovery. XML5ever is based largely on HTML5ever parser.&lt;br /&gt;
&lt;br /&gt;
==== Goal ====&lt;br /&gt;
The goal of the project is to integrate  XML5ever parser into Servo for parsing of XML documents which is currently not present in Servo. After the project, Servo will differentiate between HTML and XML documents and parse them accordingly using their respective parser which is currently lacking in it.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
To integrate XML5ever, dependency was added for XML5ever parser similar to HTML5ever.A separate interface was defined in ServoXMLParser webidl file and this interface was implemented in its corresponding rust file along with necessary stubs to parse XML. &lt;br /&gt;
The Adapter Design Pattern was applied to enhance parsing mechanism for XML5 in Servo. Interface defined using adapter pattern closely resembles servoHTMLParser interface as this will facilitate parsing or modifying any code for both XML and [https://en.wikipedia.org/wiki/HTML HTML] documents and future reader don't have to understand code for both separately as they are related in their functionality.&lt;br /&gt;
&lt;br /&gt;
== Steps done as part of the OSS Project==&lt;br /&gt;
&lt;br /&gt;
To achieve project goal we have done following initial steps in our OSS project (which have already been merged in Servo's master branch).&lt;br /&gt;
&lt;br /&gt;
* Complied servo and added xml5ever as a dependency to the script crate using cargo package manager. To do this we edited Cargo.toml located at components/script by adding xml5ever as a dependency.&lt;br /&gt;
&lt;br /&gt;
* Added xml.rs at components/script/parse with parse_xml() as a function. Declared xml as public module in mod.rs in order to declare file.&lt;br /&gt;
&lt;br /&gt;
* declared an empty ServoXMLParser interface in a webidl[https://en.wikipedia.org/wiki/Web_IDL] file located at located at components/script/dom/webidls.&lt;br /&gt;
&lt;br /&gt;
* Implemented ServoXMLParser interface with necessary stubs in servoxmlparser.rs located at components/script/dom. Also declared servoxmlparser as public module in mod.rs located at components/script/dom.&lt;br /&gt;
&lt;br /&gt;
* Called parse_xml from domparser.rs located at components/script/dom this will help compile.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
* Modify Script::load in scipt_task.rs to check whether documents we are parsing isof type text/xml. We the content type of the document is text/xml then we have to call parse_xml which we defined in OSS project. Earlier it called parse_html for all the documents but now since we are integrating the XML parser, it will call parse_xml instead of parse_html as appropriate, while passing the appropriate flag to the Document constructor.&lt;br /&gt;
* Implement a TreeSink for the XML parser which will pick nodes from XML document and append them to XML tree in the hierarchy. Serializable module also needs to be implemented in order to implement TeeSink. &lt;br /&gt;
* Support for XML document responses needs to be implemented. We will check the response Document and its MIME type. If either one of them is null then function will return null. Otherwise if MIME type is text/html then we will check its charset and if its null then set it to UTF-8 and if MIME type is text/xml then we will define document to be a Document that represents the result of running the XML parser with XML scripting support disabled on bytes. At the end end we will set document’s encoding to charset, content type to final MIME type and url to document’s URL and return response document object.&lt;br /&gt;
* Implement XMLDocument API:&lt;br /&gt;
# adding the new IDL file at components/script/dom/webidls/XMLDocument.webidl;&lt;br /&gt;
# creating components/script/dom/XMLDocument.rs;&lt;br /&gt;
# listing XMLDocument .rs in components/script/dom/mod.rs;&lt;br /&gt;
# defining the DOM struct XMLDocument with a #[dom_struct] attribute, a superclass or Reflector member, and other members as appropriate;&lt;br /&gt;
# implementing the dom::bindings::codegen::Bindings::XMLDocumentBindings::XMLDocumentMethods trait for &amp;amp;'a XMLDocument.&lt;br /&gt;
# In XMLDocument.webidl file, implement the load method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  partial interface XMLDocument {&lt;br /&gt;
	boolean load(DOMString url);&lt;br /&gt;
  };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The load(url) method must run the following steps:&lt;br /&gt;
# Let document be the XMLDocument object on which the method was invoked.&lt;br /&gt;
# Resolve the method's first argument, relative to the API base URL specified by the entry settings object. If this is not successful, throw a SyntaxError         exception and abort these steps. Otherwise, let url be the resulting absolute URL.&lt;br /&gt;
# If the origin of url is not the same as the origin of document, throw a SecurityError exception and abort these steps.&lt;br /&gt;
# Remove all child nodes of document, without firing any mutation events.&lt;br /&gt;
# Set the current document readiness of document to &amp;quot;loading&amp;quot;.&lt;br /&gt;
# Run the remainder of these steps in parallel, and return true from the method.&lt;br /&gt;
# Let result be a Document object.&lt;br /&gt;
# Let success be false.&lt;br /&gt;
# Let request be a new request whose url is url, client is entry settings object, destination is &amp;quot;subresource&amp;quot;, synchronous flag is set, mode is &amp;quot;same- 1.   origin&amp;quot;, credentials mode is &amp;quot;same-origin&amp;quot;, and whose use-URL-credentials flag is set.&lt;br /&gt;
# Let response be the result of fetching request.&lt;br /&gt;
# If response's Content-Type metadata is an XML MIME type, then run these substeps:&lt;br /&gt;
## Create a new XML parser associated with the result document.&lt;br /&gt;
## Pass this parser response's body.&lt;br /&gt;
## If there is an XML well-formedness or XML namespace well-formedness error, then remove all child nodes from result. Otherwise let success be true.&lt;br /&gt;
# Queue a task to run the following steps.&lt;br /&gt;
## Set the current document readiness of document to &amp;quot;complete&amp;quot;.&lt;br /&gt;
## Replace all the children of document by the children of result (even if it has no children), firing mutation events as if a DocumentFragment containing the new children had been inserted.&lt;br /&gt;
## Fire a simple event named load at document.&lt;br /&gt;
&lt;br /&gt;
== Challenges ==&lt;br /&gt;
&lt;br /&gt;
Primary challenge is to continuously sync with the latest commits of servo and ensuring build success after integrating each step. And keep on adding of necessary stubs as per the new changes in parsing mechanism also need continuous and careful efforts.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
To integrate the model of XML parser into current servo code, no extra test cases were added. We have added interface files and method stubs, XML parser functionality will be implemented as subsequent steps in final project. Integration success is tested by successful compilation and build after adding our changes. Following commands are used to check that all test cases were passed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
./mach test-tidy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the modifications which were suggested by servo community through comments on pull request, have been incorporated and pull request has been merged successfully.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
Servo Documentation - http://doc.servo.org/servo/index.html&lt;br /&gt;
&lt;br /&gt;
Project Definition - https://github.com/servo/servo/wiki/Integrate-xml5ever&lt;br /&gt;
&lt;br /&gt;
Rust Documentation - https://doc.rust-lang.org/nightly/index.html&lt;br /&gt;
&lt;br /&gt;
XML specs - https://xhr.spec.whatwg.org/#document-response&lt;br /&gt;
&lt;br /&gt;
YouTube - https://youtu.be/i8dONOzYwlc&lt;/div&gt;</summary>
		<author><name>Jsharda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_M1503_Integrate_xml5ever_XML_parser&amp;diff=99591</id>
		<title>CSC/ECE 517 Fall 2015 M1503 Integrate xml5ever XML parser</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_M1503_Integrate_xml5ever_XML_parser&amp;diff=99591"/>
		<updated>2015-11-13T20:20:21Z</updated>

		<summary type="html">&lt;p&gt;Jsharda: Edits in Steps done as part of an OSS Project&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rust ==&lt;br /&gt;
&lt;br /&gt;
Rust is a general-purpose, compiled programming language developed by [https://en.wikipedia.org/wiki/Mozilla Mozilla Research]. The syntax of [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] is somewhat  similar to [https://en.wikipedia.org/wiki/C_(programming_language) C] and [https://en.wikipedia.org/wiki/C%2B%2B C++], with blocks of code delimited by curly brackets, and control flow and structure. Rust does not use automatic [https://en.wikipedia.org/wiki/Garbage_collection_(computer_science) garbage collection] mechanism similar to [https://en.wikipedia.org/wiki/Java_(programming_language) java]. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms.&lt;br /&gt;
&lt;br /&gt;
== Servo ==&lt;br /&gt;
&lt;br /&gt;
Servo is web browser layout engine developed by Mozilla Research. It was developed in Rust. [https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] handles parallel environments such as rendering, layout, image decoding as a separate tasks. Servo provides [https://en.wikipedia.org/wiki/Application_programming_interface APIs], [https://en.wikipedia.org/wiki/JavaScript JavaScript] support. Servo was not developed explicitly to create full web browser but to achieve maximum parallelism.&lt;br /&gt;
&lt;br /&gt;
== Compilation and Build ==&lt;br /&gt;
&lt;br /&gt;
Servo's build system automatically downloads a snapshot Rust compiler to build itself. This is normally a specific revision of Rust upstream, but sometimes has a backported patch or two.&lt;br /&gt;
&lt;br /&gt;
Code link: https://github.com/servo/servo/ . This repository is forked to https://github.com/ronak6892/servo .&lt;br /&gt;
&lt;br /&gt;
Servo is built with Cargo, the Rust package manager. We also use Mozilla's Mach tools to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
==== Normal build ====&lt;br /&gt;
&lt;br /&gt;
To build Servo in development mode. This is useful for development, but the resulting binary is very slow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/servo/servo&lt;br /&gt;
cd servo&lt;br /&gt;
./mach build --dev&lt;br /&gt;
./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For benchmarking, performance testing, or real-world use, add the --release flag to create an optimized build:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach build --release&lt;br /&gt;
./mach run --release tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Building for Android target ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/servo/servo&lt;br /&gt;
cd servo&lt;br /&gt;
ANDROID_TOOLCHAIN=/path/to/toolchain ANDROID_NDK=/path/to/ndk PATH=$PATH:/path/to/toolchain/bin ./mach build --android&lt;br /&gt;
cd ports/android&lt;br /&gt;
ANDROID_SDK=/path/to/sdk make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rather than setting the ANDROID_* environment variables every time, you can also create a .servobuild file and then edit it to contain the correct paths to the Android SDK/NDK tools:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp servobuild.example .servobuild&lt;br /&gt;
# edit .servobuild&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Running ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach run [url] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
==== Background information ====&lt;br /&gt;
Servo uses a custom HTML5 parser written in Rust, called [https://github.com/servo/html5ever/ HTML5ever]. Servo currently lacks a parser for [https://en.wikipedia.org/wiki/XML XML] documents, which prevents it from running [https://en.wikipedia.org/wiki/XHTML XHTML] tests and implementing APIs that rely on it.&lt;br /&gt;
[https://github.com/Ygg01/xml5ever XML5ever] which is an experimental XML parser that works on a modified specification of XML called XML5, which drops certain properties of XML like well-formedness for better compatibility with HTML and better error recovery. XML5ever is based largely on HTML5ever parser.&lt;br /&gt;
&lt;br /&gt;
==== Goal ====&lt;br /&gt;
The goal of the project is to integrate  XML5ever parser into Servo for parsing of XML documents which is currently not present in Servo. After the project, Servo will differentiate between HTML and XML documents and parse them accordingly using their respective parser which is currently lacking in it.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
To integrate XML5ever, dependency was added for XML5ever parser similar to HTML5ever.A separate interface was defined in ServoXMLParser webidl file and this interface was implemented in its corresponding rust file along with necessary stubs to parse XML. &lt;br /&gt;
The Adapter Design Pattern was applied to enhance parsing mechanism for XML5 in Servo. Interface defined using adapter pattern closely resembles servoHTMLParser interface as this will facilitate parsing or modifying any code for both XML and [https://en.wikipedia.org/wiki/HTML HTML] documents and future reader don't have to understand code for both separately as they are related in their functionality.&lt;br /&gt;
&lt;br /&gt;
== Steps done as part of the OSS Project==&lt;br /&gt;
&lt;br /&gt;
To achieve project goal we have done following initial steps in our OSS project (which have already been merged in Servo's master branch).&lt;br /&gt;
&lt;br /&gt;
* Complied servo and added xml5ever as a dependency to the script crate using cargo package manager. To do this we edited Cargo.toml located at components/script by adding xml5ever as a dependency.&lt;br /&gt;
&lt;br /&gt;
* Added xml.rs at components/script/parse with parse_xml() as a function. Declared xml as public module in mod.rs in order to declare file.&lt;br /&gt;
&lt;br /&gt;
* declared an empty ServoXMLParser interface in a webidl[[Web_IDL]] file located at located at components/script/dom/webidls.&lt;br /&gt;
&lt;br /&gt;
* Implemented ServoXMLParser interface with necessary stubs in servoxmlparser.rs located at components/script/dom. Also declared servoxmlparser as public module in mod.rs located at components/script/dom.&lt;br /&gt;
&lt;br /&gt;
* Called parse_xml from domparser.rs located at components/script/dom this will help compile.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
* Modify Script::load in scipt_task.rs to check whether documents we are parsing isof type text/xml. We the content type of the document is text/xml then we have to call parse_xml which we defined in OSS project. Earlier it called parse_html for all the documents but now since we are integrating the XML parser, it will call parse_xml instead of parse_html as appropriate, while passing the appropriate flag to the Document constructor.&lt;br /&gt;
* Implement a TreeSink for the XML parser which will pick nodes from XML document and append them to XML tree in the hierarchy. Serializable module also needs to be implemented in order to implement TeeSink. &lt;br /&gt;
* Support for XML document responses needs to be implemented. We will check the response Document and its MIME type. If either one of them is null then function will return null. Otherwise if MIME type is text/html then we will check its charset and if its null then set it to UTF-8 and if MIME type is text/xml then we will define document to be a Document that represents the result of running the XML parser with XML scripting support disabled on bytes. At the end end we will set document’s encoding to charset, content type to final MIME type and url to document’s URL and return response document object.&lt;br /&gt;
* Implement XMLDocument API:&lt;br /&gt;
# adding the new IDL file at components/script/dom/webidls/XMLDocument.webidl;&lt;br /&gt;
# creating components/script/dom/XMLDocument.rs;&lt;br /&gt;
# listing XMLDocument .rs in components/script/dom/mod.rs;&lt;br /&gt;
# defining the DOM struct XMLDocument with a #[dom_struct] attribute, a superclass or Reflector member, and other members as appropriate;&lt;br /&gt;
# implementing the dom::bindings::codegen::Bindings::XMLDocumentBindings::XMLDocumentMethods trait for &amp;amp;'a XMLDocument.&lt;br /&gt;
# In XMLDocument.webidl file, implement the load method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  partial interface XMLDocument {&lt;br /&gt;
	boolean load(DOMString url);&lt;br /&gt;
  };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The load(url) method must run the following steps:&lt;br /&gt;
# Let document be the XMLDocument object on which the method was invoked.&lt;br /&gt;
# Resolve the method's first argument, relative to the API base URL specified by the entry settings object. If this is not successful, throw a SyntaxError         exception and abort these steps. Otherwise, let url be the resulting absolute URL.&lt;br /&gt;
# If the origin of url is not the same as the origin of document, throw a SecurityError exception and abort these steps.&lt;br /&gt;
# Remove all child nodes of document, without firing any mutation events.&lt;br /&gt;
# Set the current document readiness of document to &amp;quot;loading&amp;quot;.&lt;br /&gt;
# Run the remainder of these steps in parallel, and return true from the method.&lt;br /&gt;
# Let result be a Document object.&lt;br /&gt;
# Let success be false.&lt;br /&gt;
# Let request be a new request whose url is url, client is entry settings object, destination is &amp;quot;subresource&amp;quot;, synchronous flag is set, mode is &amp;quot;same- 1.   origin&amp;quot;, credentials mode is &amp;quot;same-origin&amp;quot;, and whose use-URL-credentials flag is set.&lt;br /&gt;
# Let response be the result of fetching request.&lt;br /&gt;
# If response's Content-Type metadata is an XML MIME type, then run these substeps:&lt;br /&gt;
## Create a new XML parser associated with the result document.&lt;br /&gt;
## Pass this parser response's body.&lt;br /&gt;
## If there is an XML well-formedness or XML namespace well-formedness error, then remove all child nodes from result. Otherwise let success be true.&lt;br /&gt;
# Queue a task to run the following steps.&lt;br /&gt;
## Set the current document readiness of document to &amp;quot;complete&amp;quot;.&lt;br /&gt;
## Replace all the children of document by the children of result (even if it has no children), firing mutation events as if a DocumentFragment containing the new children had been inserted.&lt;br /&gt;
## Fire a simple event named load at document.&lt;br /&gt;
&lt;br /&gt;
== Challenges ==&lt;br /&gt;
&lt;br /&gt;
Primary challenge is to continuously sync with the latest commits of servo and ensuring build success after integrating each step. And keep on adding of necessary stubs as per the new changes in parsing mechanism also need continuous and careful efforts.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
To integrate the model of XML parser into current servo code, no extra test cases were added. We have added interface files and method stubs, XML parser functionality will be implemented as subsequent steps in final project. Integration success is tested by successful compilation and build after adding our changes. Following commands are used to check that all test cases were passed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
./mach test-tidy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the modifications which were suggested by servo community through comments on pull request, have been incorporated and pull request has been merged successfully.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
Servo Documentation - http://doc.servo.org/servo/index.html&lt;br /&gt;
&lt;br /&gt;
Project Definition - https://github.com/servo/servo/wiki/Integrate-xml5ever&lt;br /&gt;
&lt;br /&gt;
Rust Documentation - https://doc.rust-lang.org/nightly/index.html&lt;br /&gt;
&lt;br /&gt;
XML specs - https://xhr.spec.whatwg.org/#document-response&lt;br /&gt;
&lt;br /&gt;
YouTube - https://youtu.be/i8dONOzYwlc&lt;/div&gt;</summary>
		<author><name>Jsharda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_M1503_Integrate_xml5ever_XML_parser&amp;diff=99590</id>
		<title>CSC/ECE 517 Fall 2015 M1503 Integrate xml5ever XML parser</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_M1503_Integrate_xml5ever_XML_parser&amp;diff=99590"/>
		<updated>2015-11-13T20:05:54Z</updated>

		<summary type="html">&lt;p&gt;Jsharda: Minor Edit in Project Goal&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rust ==&lt;br /&gt;
&lt;br /&gt;
Rust is a general-purpose, compiled programming language developed by [https://en.wikipedia.org/wiki/Mozilla Mozilla Research]. The syntax of [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] is somewhat  similar to [https://en.wikipedia.org/wiki/C_(programming_language) C] and [https://en.wikipedia.org/wiki/C%2B%2B C++], with blocks of code delimited by curly brackets, and control flow and structure. Rust does not use automatic [https://en.wikipedia.org/wiki/Garbage_collection_(computer_science) garbage collection] mechanism similar to [https://en.wikipedia.org/wiki/Java_(programming_language) java]. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms.&lt;br /&gt;
&lt;br /&gt;
== Servo ==&lt;br /&gt;
&lt;br /&gt;
Servo is web browser layout engine developed by Mozilla Research. It was developed in Rust. [https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] handles parallel environments such as rendering, layout, image decoding as a separate tasks. Servo provides [https://en.wikipedia.org/wiki/Application_programming_interface APIs], [https://en.wikipedia.org/wiki/JavaScript JavaScript] support. Servo was not developed explicitly to create full web browser but to achieve maximum parallelism.&lt;br /&gt;
&lt;br /&gt;
== Compilation and Build ==&lt;br /&gt;
&lt;br /&gt;
Servo's build system automatically downloads a snapshot Rust compiler to build itself. This is normally a specific revision of Rust upstream, but sometimes has a backported patch or two.&lt;br /&gt;
&lt;br /&gt;
Code link: https://github.com/servo/servo/ . This repository is forked to https://github.com/ronak6892/servo .&lt;br /&gt;
&lt;br /&gt;
Servo is built with Cargo, the Rust package manager. We also use Mozilla's Mach tools to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
==== Normal build ====&lt;br /&gt;
&lt;br /&gt;
To build Servo in development mode. This is useful for development, but the resulting binary is very slow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/servo/servo&lt;br /&gt;
cd servo&lt;br /&gt;
./mach build --dev&lt;br /&gt;
./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For benchmarking, performance testing, or real-world use, add the --release flag to create an optimized build:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach build --release&lt;br /&gt;
./mach run --release tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Building for Android target ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/servo/servo&lt;br /&gt;
cd servo&lt;br /&gt;
ANDROID_TOOLCHAIN=/path/to/toolchain ANDROID_NDK=/path/to/ndk PATH=$PATH:/path/to/toolchain/bin ./mach build --android&lt;br /&gt;
cd ports/android&lt;br /&gt;
ANDROID_SDK=/path/to/sdk make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rather than setting the ANDROID_* environment variables every time, you can also create a .servobuild file and then edit it to contain the correct paths to the Android SDK/NDK tools:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp servobuild.example .servobuild&lt;br /&gt;
# edit .servobuild&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Running ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach run [url] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
==== Background information ====&lt;br /&gt;
Servo uses a custom HTML5 parser written in Rust, called [https://github.com/servo/html5ever/ HTML5ever]. Servo currently lacks a parser for [https://en.wikipedia.org/wiki/XML XML] documents, which prevents it from running [https://en.wikipedia.org/wiki/XHTML XHTML] tests and implementing APIs that rely on it.&lt;br /&gt;
[https://github.com/Ygg01/xml5ever XML5ever] which is an experimental XML parser that works on a modified specification of XML called XML5, which drops certain properties of XML like well-formedness for better compatibility with HTML and better error recovery. XML5ever is based largely on HTML5ever parser.&lt;br /&gt;
&lt;br /&gt;
==== Goal ====&lt;br /&gt;
The goal of the project is to integrate  XML5ever parser into Servo for parsing of XML documents which is currently not present in Servo. After the project, Servo will differentiate between HTML and XML documents and parse them accordingly using their respective parser which is currently lacking in it.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
To integrate XML5ever, dependency was added for XML5ever parser similar to HTML5ever.A separate interface was defined in ServoXMLParser webidl file and this interface was implemented in its corresponding rust file along with necessary stubs to parse XML. &lt;br /&gt;
The Adapter Design Pattern was applied to enhance parsing mechanism for XML5 in Servo. Interface defined using adapter pattern closely resembles servoHTMLParser interface as this will facilitate parsing or modifying any code for both XML and [https://en.wikipedia.org/wiki/HTML HTML] documents and future reader don't have to understand code for both separately as they are related in their functionality.&lt;br /&gt;
&lt;br /&gt;
== Steps done as part of an OSS Project==&lt;br /&gt;
&lt;br /&gt;
To achieve project goal we have done following initial steps.&lt;br /&gt;
&lt;br /&gt;
* Complied servo and add xml5ever as a dependency to the script using cargo package manager. To do this we edited Cargo.toml located at components/script by adding xml5ever as a dependency.&lt;br /&gt;
&lt;br /&gt;
* Added xml.rs at components/script/parse with parse_xml() as a function. mod.rs also need to be modified in order to declare file.&lt;br /&gt;
&lt;br /&gt;
* Added ServoXMLParser interface with necessary stubs in servoxmlparser.rs located at components/script/dom. Also servoxmlparser need to be declared in mod.rs located at components/script/dom.&lt;br /&gt;
&lt;br /&gt;
* Called parse_xml from domparser.rs located at components/script/dom this will help compile.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
* Modify Script::load in scipt_task.rs to check whether documents we are parsing isof type text/xml. We the content type of the document is text/xml then we have to call parse_xml which we defined in OSS project. Earlier it called parse_html for all the documents but now since we are integrating the XML parser, it will call parse_xml instead of parse_html as appropriate, while passing the appropriate flag to the Document constructor.&lt;br /&gt;
* Implement a TreeSink for the XML parser which will pick nodes from XML document and append them to XML tree in the hierarchy. Serializable module also needs to be implemented in order to implement TeeSink. &lt;br /&gt;
* Support for XML document responses needs to be implemented. We will check the response Document and its MIME type. If either one of them is null then function will return null. Otherwise if MIME type is text/html then we will check its charset and if its null then set it to UTF-8 and if MIME type is text/xml then we will define document to be a Document that represents the result of running the XML parser with XML scripting support disabled on bytes. At the end end we will set document’s encoding to charset, content type to final MIME type and url to document’s URL and return response document object.&lt;br /&gt;
* Implement XMLDocument API:&lt;br /&gt;
# adding the new IDL file at components/script/dom/webidls/XMLDocument.webidl;&lt;br /&gt;
# creating components/script/dom/XMLDocument.rs;&lt;br /&gt;
# listing XMLDocument .rs in components/script/dom/mod.rs;&lt;br /&gt;
# defining the DOM struct XMLDocument with a #[dom_struct] attribute, a superclass or Reflector member, and other members as appropriate;&lt;br /&gt;
# implementing the dom::bindings::codegen::Bindings::XMLDocumentBindings::XMLDocumentMethods trait for &amp;amp;'a XMLDocument.&lt;br /&gt;
# In XMLDocument.webidl file, implement the load method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  partial interface XMLDocument {&lt;br /&gt;
	boolean load(DOMString url);&lt;br /&gt;
  };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The load(url) method must run the following steps:&lt;br /&gt;
# Let document be the XMLDocument object on which the method was invoked.&lt;br /&gt;
# Resolve the method's first argument, relative to the API base URL specified by the entry settings object. If this is not successful, throw a SyntaxError         exception and abort these steps. Otherwise, let url be the resulting absolute URL.&lt;br /&gt;
# If the origin of url is not the same as the origin of document, throw a SecurityError exception and abort these steps.&lt;br /&gt;
# Remove all child nodes of document, without firing any mutation events.&lt;br /&gt;
# Set the current document readiness of document to &amp;quot;loading&amp;quot;.&lt;br /&gt;
# Run the remainder of these steps in parallel, and return true from the method.&lt;br /&gt;
# Let result be a Document object.&lt;br /&gt;
# Let success be false.&lt;br /&gt;
# Let request be a new request whose url is url, client is entry settings object, destination is &amp;quot;subresource&amp;quot;, synchronous flag is set, mode is &amp;quot;same- 1.   origin&amp;quot;, credentials mode is &amp;quot;same-origin&amp;quot;, and whose use-URL-credentials flag is set.&lt;br /&gt;
# Let response be the result of fetching request.&lt;br /&gt;
# If response's Content-Type metadata is an XML MIME type, then run these substeps:&lt;br /&gt;
## Create a new XML parser associated with the result document.&lt;br /&gt;
## Pass this parser response's body.&lt;br /&gt;
## If there is an XML well-formedness or XML namespace well-formedness error, then remove all child nodes from result. Otherwise let success be true.&lt;br /&gt;
# Queue a task to run the following steps.&lt;br /&gt;
## Set the current document readiness of document to &amp;quot;complete&amp;quot;.&lt;br /&gt;
## Replace all the children of document by the children of result (even if it has no children), firing mutation events as if a DocumentFragment containing the new children had been inserted.&lt;br /&gt;
## Fire a simple event named load at document.&lt;br /&gt;
&lt;br /&gt;
== Challenges ==&lt;br /&gt;
&lt;br /&gt;
Primary challenge is to continuously sync with the latest commits of servo and ensuring build success after integrating each step. And keep on adding of necessary stubs as per the new changes in parsing mechanism also need continuous and careful efforts.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
To integrate the model of XML parser into current servo code, no extra test cases were added. We have added interface files and method stubs, XML parser functionality will be implemented as subsequent steps in final project. Integration success is tested by successful compilation and build after adding our changes. Following commands are used to check that all test cases were passed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
./mach test-tidy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the modifications which were suggested by servo community through comments on pull request, have been incorporated and pull request has been merged successfully.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
Servo Documentation - http://doc.servo.org/servo/index.html&lt;br /&gt;
&lt;br /&gt;
Project Definition - https://github.com/servo/servo/wiki/Integrate-xml5ever&lt;br /&gt;
&lt;br /&gt;
Rust Documentation - https://doc.rust-lang.org/nightly/index.html&lt;br /&gt;
&lt;br /&gt;
XML specs - https://xhr.spec.whatwg.org/#document-response&lt;br /&gt;
&lt;br /&gt;
YouTube - https://youtu.be/i8dONOzYwlc&lt;/div&gt;</summary>
		<author><name>Jsharda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_M1503_Integrate_xml5ever_XML_parser&amp;diff=99589</id>
		<title>CSC/ECE 517 Fall 2015 M1503 Integrate xml5ever XML parser</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_M1503_Integrate_xml5ever_XML_parser&amp;diff=99589"/>
		<updated>2015-11-13T20:01:53Z</updated>

		<summary type="html">&lt;p&gt;Jsharda: Minor Edits&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rust ==&lt;br /&gt;
&lt;br /&gt;
Rust is a general-purpose, compiled programming language developed by [https://en.wikipedia.org/wiki/Mozilla Mozilla Research]. The syntax of [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] is somewhat  similar to [https://en.wikipedia.org/wiki/C_(programming_language) C] and [https://en.wikipedia.org/wiki/C%2B%2B C++], with blocks of code delimited by curly brackets, and control flow and structure. Rust does not use automatic [https://en.wikipedia.org/wiki/Garbage_collection_(computer_science) garbage collection] mechanism similar to [https://en.wikipedia.org/wiki/Java_(programming_language) java]. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms.&lt;br /&gt;
&lt;br /&gt;
== Servo ==&lt;br /&gt;
&lt;br /&gt;
Servo is web browser layout engine developed by Mozilla Research. It was developed in Rust. [https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] handles parallel environments such as rendering, layout, image decoding as a separate tasks. Servo provides [https://en.wikipedia.org/wiki/Application_programming_interface APIs], [https://en.wikipedia.org/wiki/JavaScript JavaScript] support. Servo was not developed explicitly to create full web browser but to achieve maximum parallelism.&lt;br /&gt;
&lt;br /&gt;
== Compilation and Build ==&lt;br /&gt;
&lt;br /&gt;
Servo's build system automatically downloads a snapshot Rust compiler to build itself. This is normally a specific revision of Rust upstream, but sometimes has a backported patch or two.&lt;br /&gt;
&lt;br /&gt;
Code link: https://github.com/servo/servo/ . This repository is forked to https://github.com/ronak6892/servo .&lt;br /&gt;
&lt;br /&gt;
Servo is built with Cargo, the Rust package manager. We also use Mozilla's Mach tools to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
==== Normal build ====&lt;br /&gt;
&lt;br /&gt;
To build Servo in development mode. This is useful for development, but the resulting binary is very slow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/servo/servo&lt;br /&gt;
cd servo&lt;br /&gt;
./mach build --dev&lt;br /&gt;
./mach run tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For benchmarking, performance testing, or real-world use, add the --release flag to create an optimized build:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach build --release&lt;br /&gt;
./mach run --release tests/html/about-mozilla.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Building for Android target ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/servo/servo&lt;br /&gt;
cd servo&lt;br /&gt;
ANDROID_TOOLCHAIN=/path/to/toolchain ANDROID_NDK=/path/to/ndk PATH=$PATH:/path/to/toolchain/bin ./mach build --android&lt;br /&gt;
cd ports/android&lt;br /&gt;
ANDROID_SDK=/path/to/sdk make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rather than setting the ANDROID_* environment variables every time, you can also create a .servobuild file and then edit it to contain the correct paths to the Android SDK/NDK tools:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp servobuild.example .servobuild&lt;br /&gt;
# edit .servobuild&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Running ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach run [url] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
==== Background information ====&lt;br /&gt;
Servo uses a custom HTML5 parser written in Rust, called [https://github.com/servo/html5ever/ HTML5ever]. Servo currently lacks a parser for [https://en.wikipedia.org/wiki/XML XML] documents, which prevents it from running [https://en.wikipedia.org/wiki/XHTML XHTML] tests and implementing APIs that rely on it.&lt;br /&gt;
[https://github.com/Ygg01/xml5ever XML5ever] which is an experimental XML parser that works on a modified specification of XML called XML5, which drops certain properties of XML like well-formedness for better compatibility with HTML and better error recovery. XML5ever is based largely on HTML5ever parser.&lt;br /&gt;
&lt;br /&gt;
==== Goal ====&lt;br /&gt;
The goal of the project is to integrate  XML5ever parser into Servo.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
To integrate XML5ever, dependency was added for XML5ever parser similar to HTML5ever.A separate interface was defined in ServoXMLParser webidl file and this interface was implemented in its corresponding rust file along with necessary stubs to parse XML. &lt;br /&gt;
The Adapter Design Pattern was applied to enhance parsing mechanism for XML5 in Servo. Interface defined using adapter pattern closely resembles servoHTMLParser interface as this will facilitate parsing or modifying any code for both XML and [https://en.wikipedia.org/wiki/HTML HTML] documents and future reader don't have to understand code for both separately as they are related in their functionality.&lt;br /&gt;
&lt;br /&gt;
== Steps done as part of an OSS Project==&lt;br /&gt;
&lt;br /&gt;
To achieve project goal we have done following initial steps.&lt;br /&gt;
&lt;br /&gt;
* Complied servo and add xml5ever as a dependency to the script using cargo package manager. To do this we edited Cargo.toml located at components/script by adding xml5ever as a dependency.&lt;br /&gt;
&lt;br /&gt;
* Added xml.rs at components/script/parse with parse_xml() as a function. mod.rs also need to be modified in order to declare file.&lt;br /&gt;
&lt;br /&gt;
* Added ServoXMLParser interface with necessary stubs in servoxmlparser.rs located at components/script/dom. Also servoxmlparser need to be declared in mod.rs located at components/script/dom.&lt;br /&gt;
&lt;br /&gt;
* Called parse_xml from domparser.rs located at components/script/dom this will help compile.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
* Modify Script::load in scipt_task.rs to check whether documents we are parsing isof type text/xml. We the content type of the document is text/xml then we have to call parse_xml which we defined in OSS project. Earlier it called parse_html for all the documents but now since we are integrating the XML parser, it will call parse_xml instead of parse_html as appropriate, while passing the appropriate flag to the Document constructor.&lt;br /&gt;
* Implement a TreeSink for the XML parser which will pick nodes from XML document and append them to XML tree in the hierarchy. Serializable module also needs to be implemented in order to implement TeeSink. &lt;br /&gt;
* Support for XML document responses needs to be implemented. We will check the response Document and its MIME type. If either one of them is null then function will return null. Otherwise if MIME type is text/html then we will check its charset and if its null then set it to UTF-8 and if MIME type is text/xml then we will define document to be a Document that represents the result of running the XML parser with XML scripting support disabled on bytes. At the end end we will set document’s encoding to charset, content type to final MIME type and url to document’s URL and return response document object.&lt;br /&gt;
* Implement XMLDocument API:&lt;br /&gt;
# adding the new IDL file at components/script/dom/webidls/XMLDocument.webidl;&lt;br /&gt;
# creating components/script/dom/XMLDocument.rs;&lt;br /&gt;
# listing XMLDocument .rs in components/script/dom/mod.rs;&lt;br /&gt;
# defining the DOM struct XMLDocument with a #[dom_struct] attribute, a superclass or Reflector member, and other members as appropriate;&lt;br /&gt;
# implementing the dom::bindings::codegen::Bindings::XMLDocumentBindings::XMLDocumentMethods trait for &amp;amp;'a XMLDocument.&lt;br /&gt;
# In XMLDocument.webidl file, implement the load method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  partial interface XMLDocument {&lt;br /&gt;
	boolean load(DOMString url);&lt;br /&gt;
  };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The load(url) method must run the following steps:&lt;br /&gt;
# Let document be the XMLDocument object on which the method was invoked.&lt;br /&gt;
# Resolve the method's first argument, relative to the API base URL specified by the entry settings object. If this is not successful, throw a SyntaxError         exception and abort these steps. Otherwise, let url be the resulting absolute URL.&lt;br /&gt;
# If the origin of url is not the same as the origin of document, throw a SecurityError exception and abort these steps.&lt;br /&gt;
# Remove all child nodes of document, without firing any mutation events.&lt;br /&gt;
# Set the current document readiness of document to &amp;quot;loading&amp;quot;.&lt;br /&gt;
# Run the remainder of these steps in parallel, and return true from the method.&lt;br /&gt;
# Let result be a Document object.&lt;br /&gt;
# Let success be false.&lt;br /&gt;
# Let request be a new request whose url is url, client is entry settings object, destination is &amp;quot;subresource&amp;quot;, synchronous flag is set, mode is &amp;quot;same- 1.   origin&amp;quot;, credentials mode is &amp;quot;same-origin&amp;quot;, and whose use-URL-credentials flag is set.&lt;br /&gt;
# Let response be the result of fetching request.&lt;br /&gt;
# If response's Content-Type metadata is an XML MIME type, then run these substeps:&lt;br /&gt;
## Create a new XML parser associated with the result document.&lt;br /&gt;
## Pass this parser response's body.&lt;br /&gt;
## If there is an XML well-formedness or XML namespace well-formedness error, then remove all child nodes from result. Otherwise let success be true.&lt;br /&gt;
# Queue a task to run the following steps.&lt;br /&gt;
## Set the current document readiness of document to &amp;quot;complete&amp;quot;.&lt;br /&gt;
## Replace all the children of document by the children of result (even if it has no children), firing mutation events as if a DocumentFragment containing the new children had been inserted.&lt;br /&gt;
## Fire a simple event named load at document.&lt;br /&gt;
&lt;br /&gt;
== Challenges ==&lt;br /&gt;
&lt;br /&gt;
Primary challenge is to continuously sync with the latest commits of servo and ensuring build success after integrating each step. And keep on adding of necessary stubs as per the new changes in parsing mechanism also need continuous and careful efforts.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
To integrate the model of XML parser into current servo code, no extra test cases were added. We have added interface files and method stubs, XML parser functionality will be implemented as subsequent steps in final project. Integration success is tested by successful compilation and build after adding our changes. Following commands are used to check that all test cases were passed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
./mach test-tidy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the modifications which were suggested by servo community through comments on pull request, have been incorporated and pull request has been merged successfully.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
Servo Documentation - http://doc.servo.org/servo/index.html&lt;br /&gt;
&lt;br /&gt;
Project Definition - https://github.com/servo/servo/wiki/Integrate-xml5ever&lt;br /&gt;
&lt;br /&gt;
Rust Documentation - https://doc.rust-lang.org/nightly/index.html&lt;br /&gt;
&lt;br /&gt;
XML specs - https://xhr.spec.whatwg.org/#document-response&lt;br /&gt;
&lt;br /&gt;
YouTube - https://youtu.be/i8dONOzYwlc&lt;/div&gt;</summary>
		<author><name>Jsharda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015&amp;diff=97211</id>
		<title>CSC/ECE 517 Fall 2015</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015&amp;diff=97211"/>
		<updated>2015-10-27T18:36:07Z</updated>

		<summary type="html">&lt;p&gt;Jsharda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Writing Assignment 2==&lt;br /&gt;
*[[CSC/ECE_517_Fall_2015/sample_page]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2015/ossE1558BGJ]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss/M1502/AAAASS]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss/M1503/IntegrateXMLParser]]&lt;/div&gt;</summary>
		<author><name>Jsharda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015&amp;diff=97210</id>
		<title>CSC/ECE 517 Fall 2015</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015&amp;diff=97210"/>
		<updated>2015-10-27T17:29:03Z</updated>

		<summary type="html">&lt;p&gt;Jsharda: Added Link for M1503&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Writing Assignment 2==&lt;br /&gt;
*[[CSC/ECE_517_Fall_2015/sample_page]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2015/ossE1558BGJ]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss/M1502/AAAASS]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss/M1503/XMLParser]]&lt;/div&gt;</summary>
		<author><name>Jsharda</name></author>
	</entry>
</feed>