1 // Copyright 2013 Zynga Inc.
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
21 var mElement:XmlElement;
27 public static property ignoreComments : Boolean {
28 get { throw new System.NotImplementedException(); }
29 set { throw new System.NotImplementedException(); }
32 public static property ignoreProcessingInstructions : Boolean {
33 get { throw new System.NotImplementedException(); }
34 set { throw new System.NotImplementedException(); }
37 public static property ignoreWhitespace : Boolean {
38 get { throw new System.NotImplementedException(); }
39 set { throw new System.NotImplementedException(); }
42 public static property prettyIndent : int {
43 get { throw new System.NotImplementedException(); }
44 set { throw new System.NotImplementedException(); }
47 public static property prettyPrinting : Boolean {
48 get { throw new System.NotImplementedException(); }
49 set { throw new System.NotImplementedException(); }
56 public function XML(value:Object) {
58 if (value is XmlElement)
60 mElement = value as XmlElement;
61 } else if (value is flash.utils.ByteArray)
63 var ba:flash.utils.ByteArray = value as flash.utils.ByteArray;
65 // read string from byte array
67 var xmlString:String = ba.readAllUTF();
69 // parse xml document from string
70 var doc:XmlDocument = new XmlDocument();
71 doc.LoadXml(xmlString);
72 mElement = doc.DocumentElement;
73 } else if (value is String)
75 // parse xml document from string
76 var doc:XmlDocument = new XmlDocument();
77 doc.LoadXml(value as String);
78 mElement = doc.DocumentElement;
82 throw new System.NotImplementedException();
87 internal function XML(value:XmlNode)
89 // TODO: mElement = value;
92 public function addNamespace(ns:Object):XML {
93 throw new System.NotImplementedException();
96 public function appendChild(child:Object):XML {
97 throw new System.NotImplementedException();
101 public function attribute(attributeName:String):XMLList {
102 throw new System.NotImplementedException();
105 public function attribute(attributeName:String):String {
106 return mElement.HasAttribute(attributeName) ? mElement.GetAttribute(attributeName) : null;
109 public function attributes():XMLList {
110 throw new System.NotImplementedException();
113 public function child(propertyName:Object):XMLList {
114 throw new System.NotImplementedException();
117 public function childIndex():int {
118 throw new System.NotImplementedException();
121 public function children():XMLList {
122 throw new System.NotImplementedException();
125 public function comments():XMLList {
126 throw new System.NotImplementedException();
129 public function contains(value:XML):Boolean {
130 throw new System.NotImplementedException();
133 public function copy():XML {
134 throw new System.NotImplementedException();
137 public static function defaultSettings():Object {
138 throw new System.NotImplementedException();
141 public function descendants():XMLList {
142 throw new System.NotImplementedException();
145 public function descendants(name:Object):XMLList {
146 throw new System.NotImplementedException();
149 public function elements():XMLList {
150 return new XMLList(mElement.GetElementsByTagName("*"));
153 public function elements(name:String):XMLList {
154 return new XMLList(mElement.GetElementsByTagName(name));
157 public function hasComplexContent():Boolean {
158 throw new System.NotImplementedException();
161 public function hasOwnProperty(p:String):Boolean {
162 throw new System.NotImplementedException();
165 public function hasSimpleContent():Boolean {
166 throw new System.NotImplementedException();
169 public function inScopeNamespaces():Array {
170 throw new System.NotImplementedException();
173 public function insertChildAfter(child1:Object, child2:Object):* {
174 throw new System.NotImplementedException();
177 public function insertChildBefore(child1:Object, child2:Object):* {
178 throw new System.NotImplementedException();
181 public function length():int {
182 throw new System.NotImplementedException();
185 public function localName():String {
186 return mElement.LocalName;
189 public function name():QName {
190 return new QName(mElement.NamespaceURI, mElement.Name);
193 public function @namespace(prefix:String = null):* {
194 throw new System.NotImplementedException();
197 public function namespaceDeclarations():Array {
198 throw new System.NotImplementedException();
201 public function nodeKind():String {
202 throw new System.NotImplementedException();
205 public function normalize():XML {
206 throw new System.NotImplementedException();
209 public function parent():* {
210 throw new System.NotImplementedException();
213 public function prependChild(value:Object):XML {
214 throw new System.NotImplementedException();
217 public function processingInstructions(name:String):XMLList {
218 throw new System.NotImplementedException();
221 public function propertyIsEnumerable(p:String):Boolean {
222 throw new System.NotImplementedException();
225 public function removeNamespace(ns:Namespace):XML {
226 throw new System.NotImplementedException();
229 public function replace(propertyName:Object, value:XML):XML {
230 throw new System.NotImplementedException();
233 public function setChildren(value:Object):XML {
234 throw new System.NotImplementedException();
237 public function setLocalName(name:String):void {
238 throw new System.NotImplementedException();
241 public function setName(name:String):void {
242 throw new System.NotImplementedException();
245 public function setNamespace(ns:Namespace):void {
246 throw new System.NotImplementedException();
249 public function setSettings(... rest):void {
250 throw new System.NotImplementedException();
253 public function settings():Object {
254 throw new System.NotImplementedException();
257 public function text():XMLList {
258 throw new System.NotImplementedException();
261 public function toJSON(k:String):* {
262 throw new System.NotImplementedException();
265 public function toString():String {
266 throw new System.NotImplementedException();
269 public function toXMLString():String {
270 throw new System.NotImplementedException();
273 public function valueOf():Object {
274 throw new System.NotImplementedException();
277 public static implicit operator String (xml:XML) {
278 throw new System.NotImplementedException();