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:'?10435 -> string
Type parameters: '?10435

Gets the attribute with the given name from the given XmlNode

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

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:('?10440 -> '?10441) -> node:'?10440 -> '?10441
Type parameters: '?10440, '?10441

Parses a XmlNode

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

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:'?10463 -> doc:XmlDocument -> XmlDocument
Type parameters: '?10463

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

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

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:'?10452 -> doc:XmlDocument -> string
Type parameters: '?10452

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

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

Selects a xml node via XPath from the given document

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

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:'?10432 -> writer:XmlWriter -> XmlWriter
Type parameters: '?10432

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