This is part of the Fake.Core.Xml module.

Xml

Contains functions to read and write XML files.

Functions and values

Function or valueDescription
createDoc(text)
Signature: text:string -> XmlDocument

Loads the given text into a XmlDocument

endElement(writer)
Signature: writer:XmlWriter -> XmlWriter

Writes an XML end element to the given XmlTextWriter

getAttribute name node
Signature: name:string -> node:'?9839 -> string
Type parameters: '?9839

Gets the attribute with the given name from the given XmlNode

getChilds(node)
Signature: node:'?9841 -> seq<XmlNode>
Type parameters: '?9841

Gets a sequence of all child nodes for the given XmlNode

getDocElement(doc)
Signature: doc:XmlDocument -> XmlElement

Gets the DocumentElement of the XmlDocument

getSubNode name node
Signature: name:string -> node:XmlNode -> XmlNode

Gets the first sub node with the given name from the given XmlNode

getWriter(fileName)
Signature: fileName:string -> XmlWriter

Creates a XmlWriter which writes to the given file name

loadDoc(path)
Signature: path:string -> XmlDocument

Loads the given file path into a XmlDocument

parse name f node
Signature: name:string -> f:('?9844 -> '?9845) -> node:'?9844 -> '?9845
Type parameters: '?9844, '?9845

Parses a XmlNode

parseSubNode name f
Signature: name:string -> f:(XmlNode -> '?9847) -> XmlNode -> '?9847
Type parameters: '?9847

Parses a XML subnode

poke fileName xpath value
Signature: fileName:string -> xpath:string -> value:string -> unit

Replaces text in a XML file at the location specified by a XPath expression.

pokeInnerText(...)
Signature: fileName:string -> xpath:string -> innerTextValue:string -> unit

Replaces the inner text of an xml node in a XML file at the location specified by a XPath expression.

pokeInnerTextNS(...)
Signature: fileName:string -> namespaces:seq<string * string> -> xpath:string -> innerTextValue:string -> unit

Replaces inner text of an xml node in a XML file at the location specified by a XPath expression, with support for namespaces.

pokeNS fileName namespaces xpath value
Signature: fileName:string -> namespaces:seq<string * string> -> xpath:string -> value:string -> unit

Replaces text in a XML file at the location specified by a XPath expression, with support for namespaces.

read(...)
Signature: failOnError:bool -> xmlFileName:string -> nameSpace:string -> prefix:string -> xPath:string -> seq<string>

Reads a value from a XML document using a XPath

read_Int(...)
Signature: failOnError:bool -> xmlFileName:string -> nameSpace:string -> prefix:string -> xPath:string -> bool * int

Reads a value from a XML document using a XPath Returns if the value is an int and the value

replaceXPath xpath value doc
Signature: xpath:string -> value:string -> doc:XmlDocument -> XmlDocument

Replaces text in the XML document specified by a XPath expression.

replaceXPathAttribute(...)
Signature: xpath:string -> attribute:string -> value:string -> doc:XmlDocument -> XmlDocument

Replaces the value of attribute in an xml node in the XML document specified by a XPath expression.

replaceXPathInnerText(...)
Signature: xpath:string -> innerTextValue:string -> doc:XmlDocument -> XmlDocument

Replaces the inner text of an xml node in the XML document specified by a XPath expression.

replaceXPathInnerTextNS(...)
Signature: xpath:string -> innerTextValue:string -> namespaces:'?9867 -> doc:XmlDocument -> XmlDocument
Type parameters: '?9867

Replaces inner text in a XML document specified by a XPath expression, with support for namespaces.

replaceXPathNS(...)
Signature: xpath:string -> value:string -> namespaces:'?9865 -> doc:XmlDocument -> XmlDocument
Type parameters: '?9865

Replaces text in a XML document specified by a XPath expression, with support for namespaces.

saveDoc fileName doc
Signature: fileName:string -> doc:XmlDocument -> unit
selectXPathAttributeValue(...)
Signature: xpath:string -> attribute:string -> namespaces:'?9856 -> doc:XmlDocument -> string
Type parameters: '?9856

Selects a xml node attribute value via XPath from the given document

selectXPathNode xpath namespaces doc
Signature: xpath:string -> namespaces:'?9858 -> doc:XmlDocument -> XmlNode
Type parameters: '?9858

Selects a xml node via XPath from the given document

selectXPathValue xpath namespaces doc
Signature: xpath:string -> namespaces:'?9854 -> doc:XmlDocument -> string
Type parameters: '?9854

Selects a xml node value via XPath from the given document

startElement name writer
Signature: name:string -> writer:XmlWriter -> XmlWriter

Writes an XML start element to the given XmlTextWriter

writeAttribute name value writer
Signature: name:string -> value:'?9836 -> writer:XmlWriter -> XmlWriter
Type parameters: '?9836

Writes an XML attribute to current element of the given XmlTextWriter

writeCDataElement(...)
Signature: elementName:string -> data:string -> writer:XmlWriter -> XmlWriter

Writes an CData element to the given XmlTextWriter

writeComment comment writer
Signature: comment:string -> writer:XmlWriter -> XmlWriter

Writes an XML comment to the given XmlTextWriter