C# Class XmlIntelliSense.App.XHelper.XmlParser

Combination of Sharpdevelop XmlEditor Code (https://github.com/icsharpcode/SharpDevelop/tree/master/src/AddIns/DisplayBindings/XmlEditor) & XSemmel https://xsemmel.codeplex.com Copyright 2014 AlphaSierraPapa for the SharpDevelop team. SharpDevelop is distributed under the MIT license. XSemmel: Simplified BSD License (BSD) Copyright (c) 2007, F. Schnitzer All rights reserved.
Mostra file Open project: Code-Inside/Samples

Public Methods

Method Description
GetActiveElementStartIndex ( string xml, int index ) : int

Source: Sharpdevelop Locates the index of the start tag < character.

GetActiveElementStartPath ( string xml, int index ) : XmlElementInformation

Source: SharpDevelop Gets path of the xml element start tag that the specified index is currently inside.

If the index outside the start tag then an empty path is returned.

GetElementAtCursor ( string xml, int offset ) : string

Source: https://xsemmel.codeplex.com

GetParentElementPath ( string xml ) : XmlElementInformation

Source: SharpDevelop

IsClosingElement ( string xml, int offset, string elementName = null ) : bool

Source: https://xsemmel.codeplex.com Liefert true falls das Element beim offset ein schließendes Element ist, also </x> oder <x/>

Private Methods

Method Description
GetActiveElementEndIndex ( string xml, int index ) : int

Source: Sharpdevelop Locates the index of the end tag character.

GetActiveElementStartPath ( string xml, int index, string elementText ) : XmlElementInformation

Source: Sharpdevelop Gets the active element path given the element text.

GetActiveElementStartText ( string xml, int index ) : string

Source: SharpDevelop Gets the text of the xml element start tag that the index is currently inside.

GetElementName ( string xml ) : XmlElementQualifiedName

Source: Sharpdevelop Gets the element name from the element start tag string.

GetElementNamespace ( string xml ) : XmlNamespace

Source: Sharpdevelop Gets the element namespace from the element start tag string.

GetFullParentElementPath ( string xml ) : XmlElementInformation

Source: Sharpdevelop Gets the parent element path based on the index position. This method does not compact the path so it will include all elements including those in another namespace in the path.

Method Details

GetActiveElementStartIndex() public static method

Source: Sharpdevelop Locates the index of the start tag < character.
public static GetActiveElementStartIndex ( string xml, int index ) : int
xml string
index int
return int

GetActiveElementStartPath() public static method

Source: SharpDevelop Gets path of the xml element start tag that the specified index is currently inside.
If the index outside the start tag then an empty path is returned.
public static GetActiveElementStartPath ( string xml, int index ) : XmlElementInformation
xml string
index int
return XmlElementInformation

GetElementAtCursor() public static method

Source: https://xsemmel.codeplex.com
public static GetElementAtCursor ( string xml, int offset ) : string
xml string
offset int
return string

GetParentElementPath() public static method

Source: SharpDevelop
public static GetParentElementPath ( string xml ) : XmlElementInformation
xml string
return XmlElementInformation

IsClosingElement() public static method

Source: https://xsemmel.codeplex.com Liefert true falls das Element beim offset ein schließendes Element ist, also </x> oder <x/>
public static IsClosingElement ( string xml, int offset, string elementName = null ) : bool
xml string
offset int
elementName string optional, elementName = GetElementAtCursor(xml, offset)
return bool