Skip to content

T_CodeJam_Xml_XNodeExtensions

andrewvk edited this page Apr 5, 2016 · 11 revisions

XNodeExtensions Class

[This is preliminary documentation and is subject to change.]

Extensions for XLinq.

Inheritance Hierarchy

System.Object
  CodeJam.Xml.XNodeExtensions
Namespace: CodeJam.Xml
Assembly: CodeJam (in CodeJam.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#

public static class XNodeExtensions

VB

<ExtensionAttribute>
Public NotInheritable Class XNodeExtensions

F#

[<AbstractClassAttribute>]
[<SealedAttribute>]
[<ExtensionAttribute>]
type XNodeExtensions =  class end

The XNodeExtensions type exposes the following members.

Methods

 

Name Description
Public methodStatic member OptionalAttributeValue(XElement, XName, String) Returns string value of optional attribute.
Public methodStatic member OptionalAttributeValue(T)(XElement, XName, Func(String, T), T) Returns value of optional attribute.
Public methodStatic member OptionalElementAltValue(T) Returns value of optional element.
Public methodStatic member OptionalElementValue(XElement, XName, String) Returns string value of optional element.
Public methodStatic member OptionalElementValue(T)(XElement, XName, Func(XElement, T), T) Returns value of optional element.
Public methodStatic member RequiredAttribute Returns attribute with name name, or thows an exception if attribute does not exists.
Public methodStatic member RequiredElement(XElement, XName) Returns child element with name name, or throws an exception if element does not exists.
Public methodStatic member RequiredElement(XElement, XName[]) Returns child element with one of names in names, or throws an exception if element does not exists.
Public methodStatic member RequiredRoot(XDocument) Returns document root, or throw an exception, if root is null.
Public methodStatic member RequiredRoot(XDocument, XName) Returns document root, or throws an exception, if root is null or has another name.
  Back to Top

See Also

Reference

CodeJam.Xml Namespace

Clone this wiki locally