Xmlsq Namespace
===============
The .NET interface to Xmlsq.


Classes
-------

| Class                    | Description                                                   |
| ------------------------ | ------------------------------------------------------------- |
| [Gen](#gen_gen)                 | Get general diagnostic info about the core diXmlsq DLL.       |
| [Query](#query_query)               | Perform simple and full XPath 1.0 queries on an XML document. |
| [XmlsqErrorException](#xmlsqerrorexception_xmlsqerrorexception) | Xmlsq custom exception.                                       |


Enumerations
------------

| Enumeration     | Description          |
| --------------- | -------------------- |
| [Query.Opts](#query_opts_query-opts) | Options for queries. |




<a id="gen_gen"></a>


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
------

```csharp
public class Gen
```

The **Gen** type exposes the following members.


Methods
-------

| Name             | Description                                                      |
| ---------------- | ---------------------------------------------------------------- |
| [CompileTime](#gen_compiletime) | Get date and time the core diXmlsq DLL module was last compiled. |
| [ModuleName](#gen_modulename)  | Get full path name of the current process's core library DLL.    |
| [NetVersion](#gen_netversion)  | Return the version of this .NET module.                          |
| [Platform](#gen_platform)    | Get platform on which the core diXmlsq DLL is running.           |
| [Version](#gen_version)     | Get version number of core diXmlsq DLL.                          |


See Also
--------


[Xmlsq Namespace](#xmlsq-namespace)




<a id="gen_compiletime"></a>


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
------

```csharp
public static string CompileTime()
```

#### Return Value
String  
Date and time value.

See Also
--------


[Gen Class](#gen_gen)  
[Xmlsq Namespace](#xmlsq-namespace)




<a id="gen_modulename"></a>


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
------

```csharp
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](#gen_gen)  
[Xmlsq Namespace](#xmlsq-namespace)




<a id="gen_netversion"></a>


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
------

```csharp
public static string NetVersion()
```

#### Return Value
String  
Version string, e.g. `"01.02.03"`

See Also
--------


[Gen Class](#gen_gen)  
[Xmlsq Namespace](#xmlsq-namespace)




<a id="gen_platform"></a>


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
------

```csharp
public static string Platform()
```

#### Return Value
String  
"Win32" or "Win64"

See Also
--------


[Gen Class](#gen_gen)  
[Xmlsq Namespace](#xmlsq-namespace)




<a id="gen_version"></a>


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
------

```csharp
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](#gen_gen)  
[Xmlsq Namespace](#xmlsq-namespace)




<a id="query_query"></a>


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
------

```csharp
public class Query
```

The **Query** type exposes the following members.


Methods
-------

| Name           | Description                                                      |
| -------------- | ---------------------------------------------------------------- |
| [Count](#query_count)     | Compute the count for the XPath query.                           |
| [FullQuery](#query_fullquery) | Perform a full XPath query on the XML input with options.        |
| [GetText](#query_gettext)   | Extract text from the first matching XML file node with options. |


See Also
--------


[Xmlsq Namespace](#xmlsq-namespace)




<a id="query_count"></a>


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
------

```csharp
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](#xmlsqerrorexception_xmlsqerrorexception) | Bad input: missing file or invalid XML or invalid XPath. |


See Also
--------


[Query Class](#query_query)  
[Xmlsq Namespace](#xmlsq-namespace)




<a id="query_fullquery"></a>


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
------

```csharp
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](#query_opts_query-opts)  (Optional)
Formatting options for output.

#### Return Value
String  
String containing result of query.

Exceptions
----------

| Exception                | Condition                                                |
| ------------------------ | -------------------------------------------------------- |
| [XmlsqErrorException](#xmlsqerrorexception_xmlsqerrorexception) | Bad input: missing file or invalid XML or invalid XPath. |


See Also
--------


[Query Class](#query_query)  
[Xmlsq Namespace](#xmlsq-namespace)




<a id="query_gettext"></a>


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
------

```csharp
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](#query_opts_query-opts)  (Optional)
Formatting options for output.

#### Return Value
String  
Extracted text

Exceptions
----------

| Exception                | Condition                                                |
| ------------------------ | -------------------------------------------------------- |
| [XmlsqErrorException](#xmlsqerrorexception_xmlsqerrorexception) | Bad input: missing file or invalid XML or invalid XPath. |


See Also
--------


[Query Class](#query_query)  
[Xmlsq Namespace](#xmlsq-namespace)




<a id="xmlsqerrorexception_xmlsqerrorexception"></a>


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
------

```csharp
public class XmlsqErrorException : Exception
```

The **XmlsqErrorException** type exposes the following members.


Constructors
------------

| Name                             | Description                         |
| -------------------------------- | ----------------------------------- |
| [XmlsqErrorException()](#xmlsqerrorexception_xmlsqerrorexception)       | Xmlsq query failed - invalid input. |
| [XmlsqErrorException(String)](#xmlsqerrorexception_xmlsqerrorexception-string) | Xmlsq query failed - invalid input. |


See Also
--------


[Xmlsq Namespace](#xmlsq-namespace)




<a id="xmlsqerrorexception_xmlsqerrorexception-string"></a>


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()](#xmlsqerrorexception_xmlsqerrorexception)      | Xmlsq query failed - invalid input. |
| **XmlsqErrorException(String)** | Xmlsq query failed - invalid input. |


Syntax
------

```csharp
public XmlsqErrorException(
	string message
)
```

#### Parameters

##### *message*  String
Message string


See Also
--------


[XmlsqErrorException Class](#xmlsqerrorexception_xmlsqerrorexception)  
[Xmlsq Namespace](#xmlsq-namespace)




<a id="query_opts_query-opts"></a>


Query.Opts Enumeration
======================
Options for queries.
  
**Namespace:** Xmlsq  
**Assembly:**  diXmlsqNet (in diXmlsqNet.dll) Version: 1.0.1.29962 (1.0.1.0)

Syntax
------

```csharp
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](#xmlsq-namespace)



***
Created: 2025-10-20 16:39:19  
Copyright (C) 2025 D.I. Management Services Pty Ltd t/a CryptoSys [https://cryptosys.net](https://cryptosys.net)
