Xmlsq Namespace

The .NET interface to Xmlsq.

Classes

Class Description
Gen Get general diagnostic info about the core diXmlsq DLL.
Query Perform simple and full XPath 1.0 queries on an XML document.
XmlsqErrorException Xmlsq custom exception.

Enumerations

Enumeration Description
Query.Opts Options for queries.

Gen Class

Get general diagnostic info about the core diXmlsq DLL.

Inheritance Hierarchy

System.Object
Xmlsq.Gen

Namespace: Xmlsq
Assembly: diXmlsqNet (in diXmlsqNet.dll) Version: 1.0.1.29962 (1.0.1.0)

Syntax

public class Gen

The Gen type exposes the following members.

Methods

Name Description
CompileTime Get date and time the core diXmlsq DLL module was last compiled.
ModuleName Get full path name of the current process’s core library DLL.
NetVersion Return the version of this .NET module.
Platform Get platform on which the core diXmlsq DLL is running.
Version Get version number of core diXmlsq DLL.

See Also

Xmlsq Namespace

Gen.CompileTime Method

Get date and time the core diXmlsq DLL module was last compiled.

Namespace: Xmlsq
Assembly: diXmlsqNet (in diXmlsqNet.dll) Version: 1.0.1.29962 (1.0.1.0)

Syntax

public static string CompileTime()

Return Value

String
Date and time value.

See Also

Gen Class
Xmlsq Namespace

Gen.ModuleName Method

Get full path name of the current process’s core library DLL.

Namespace: Xmlsq
Assembly: diXmlsqNet (in diXmlsqNet.dll) Version: 1.0.1.29962 (1.0.1.0)

Syntax

public static string ModuleName()

Return Value

String
Path name.

Remarks

Note C:\WINDOWS\SYSTEM32\ may be returned even if it is really C:\WINDOWS\SYSWOW64\.

See Also

Gen Class
Xmlsq Namespace

Gen.NetVersion Method

Return the version of this .NET module.

Namespace: Xmlsq
Assembly: diXmlsqNet (in diXmlsqNet.dll) Version: 1.0.1.29962 (1.0.1.0)

Syntax

public static string NetVersion()

Return Value

String
Version string, e.g. "01.02.03"

See Also

Gen Class
Xmlsq Namespace

Gen.Platform Method

Get platform on which the core diXmlsq DLL is running.

Namespace: Xmlsq
Assembly: diXmlsqNet (in diXmlsqNet.dll) Version: 1.0.1.29962 (1.0.1.0)

Syntax

public static string Platform()

Return Value

String
“Win32” or “Win64”

See Also

Gen Class
Xmlsq Namespace

Gen.Version Method

Get version number of core diXmlsq DLL.

Namespace: Xmlsq
Assembly: diXmlsqNet (in diXmlsqNet.dll) Version: 1.0.1.29962 (1.0.1.0)

Syntax

public static int Version()

Return Value

Int32
Version number in form Major * 10000 + Minor * 100 + Release

Remarks

E.g. version 1.2.3 returns 10203

See Also

Gen Class
Xmlsq Namespace

Query Class

Perform simple and full XPath 1.0 queries on an XML document.

Inheritance Hierarchy

System.Object
Xmlsq.Query

Namespace: Xmlsq
Assembly: diXmlsqNet (in diXmlsqNet.dll) Version: 1.0.1.29962 (1.0.1.0)

Syntax

public class Query

The Query type exposes the following members.

Methods

Name Description
Count Compute the count for the XPath query.
FullQuery Perform a full XPath query on the XML input with options.
GetText Extract text from the first matching XML file node with options.

See Also

Xmlsq Namespace

Query.Count Method

Compute the count for the XPath query.

Namespace: Xmlsq
Assembly: diXmlsqNet (in diXmlsqNet.dll) Version: 1.0.1.29962 (1.0.1.0)

Syntax

public static int Count(
    string xmlFile,
    string query
)

Parameters

xmlFile String

Name of XML file or string containing XML data.

query String

XPath 1.0 expression. This must evaluate to a node or node set.

Return Value

Int32
The integer value of count(query).

Exceptions

Exception Condition
XmlsqErrorException Bad input: missing file or invalid XML or invalid XPath.

See Also

Query Class
Xmlsq Namespace

Query.FullQuery Method

Perform a full XPath query on the XML input with options.

Namespace: Xmlsq
Assembly: diXmlsqNet (in diXmlsqNet.dll) Version: 1.0.1.29962 (1.0.1.0)

Syntax

public static string FullQuery(
    string xmlFile,
    string query,
    Query.Opts opts = Query.Opts.Default
)

Parameters

xmlFile String

Name of XML file or string containing XML data.

query String

XPath 1.0 expression.

opts Query.Opts (Optional)

Formatting options for output.

Return Value

String
String containing result of query.

Exceptions

Exception Condition
XmlsqErrorException Bad input: missing file or invalid XML or invalid XPath.

See Also

Query Class
Xmlsq Namespace

Query.GetText Method

Extract text from the first matching XML file node with options.

Namespace: Xmlsq
Assembly: diXmlsqNet (in diXmlsqNet.dll) Version: 1.0.1.29962 (1.0.1.0)

Syntax

public static string GetText(
    string xmlFile,
    string query,
    Query.Opts opts = Query.Opts.Default
)

Parameters

xmlFile String

Name of XML file or string containing XML data.

query String

XPath 1.0 expression to select a node. This must evaluate to a node or node set.

opts Query.Opts (Optional)

Formatting options for output.

Return Value

String
Extracted text

Exceptions

Exception Condition
XmlsqErrorException Bad input: missing file or invalid XML or invalid XPath.

See Also

Query Class
Xmlsq Namespace

XmlsqErrorException Class

Xmlsq custom exception.

Inheritance Hierarchy

System.Object
System.Exception
Xmlsq.XmlsqErrorException

Namespace: Xmlsq
Assembly: diXmlsqNet (in diXmlsqNet.dll) Version: 1.0.1.29962 (1.0.1.0)

Syntax

public class XmlsqErrorException : Exception

The XmlsqErrorException type exposes the following members.

Constructors

Name Description
XmlsqErrorException() Xmlsq query failed - invalid input.
XmlsqErrorException(String) Xmlsq query failed - invalid input.

See Also

Xmlsq Namespace

XmlsqErrorException(String) Constructor

Xmlsq query failed - invalid input.

Namespace: Xmlsq
Assembly: diXmlsqNet (in diXmlsqNet.dll) Version: 1.0.1.29962 (1.0.1.0)

Overloads

Name Description
XmlsqErrorException() Xmlsq query failed - invalid input.
XmlsqErrorException(String) Xmlsq query failed - invalid input.

Syntax

public XmlsqErrorException(
    string message
)

Parameters

message String

Message string

See Also

XmlsqErrorException Class
Xmlsq Namespace

Query.Opts Enumeration

Options for queries.

Namespace: Xmlsq
Assembly: diXmlsqNet (in diXmlsqNet.dll) Version: 1.0.1.29962 (1.0.1.0)

Syntax

public enum Opts

Members

Member name Description
Default Use default options.
Asciify Asciify the output as XML character references [default=UTF-8-encoded].
Raw Output nodeset in raw format [default=prettify].
Trim Trim leading and trailing whitespace (and collapse whitespace for an attribute value).

See Also

Xmlsq Namespace


Created: 2025-10-20 16:39:19
Copyright (C) 2025 D.I. Management Services Pty Ltd t/a CryptoSys https://cryptosys.net