예제 #1
0
파일: wafl.cs 프로젝트: pusp/o2platform
 public static XRootNamespace Parse(string text, LoadOptions options) {
     XRootNamespace root = new XRootNamespace();
     root.doc = XDocument.Parse(text, options);
     XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance);
     if ((typedRoot == null)) {
         throw new LinqToXsdException("Invalid root element in xml document.");
     }
     root.rootObject = typedRoot;
     return root;
 }
예제 #2
0
파일: wafl.cs 프로젝트: pusp/o2platform
 public static XRootNamespace Load(XmlReader xmlReader) {
     XRootNamespace root = new XRootNamespace();
     root.doc = XDocument.Load(xmlReader);
     XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance);
     if ((typedRoot == null)) {
         throw new LinqToXsdException("Invalid root element in xml document.");
     }
     root.rootObject = typedRoot;
     return root;
 }