Quantcast
Channel: MSBuild Extension Pack
Viewing all articles
Browse latest Browse all 1211

Created Issue: ReadElement should allow XPath of "/" to read entire document [10637]

$
0
0
This may seem like a silly request, but when repackaging / cobbling together Xml files (for instance into a master SQL script), it may be useful to get the Xml of an entire document, rather than using ReadAllText against the file.

Only a simple change is required for the ReadElement method to support this.

Old:
XmlNode node = this.xmlFileDoc.SelectSingleNode(this.XPath, this.namespaceManager);
if (node != null && node.NodeType == XmlNodeType.Element)

New:

XmlNode node = this.xmlFileDoc.SelectSingleNode(this.XPath, this.namespaceManager);
if (node != null && (node.NodeType == XmlNodeType.Element || node.NodeType == XmlNodeType.Document))

Viewing all articles
Browse latest Browse all 1211

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>