Questions tagged [outerxml]
6 questions
119
votes
12 answers
What is the simplest way to get indented XML with line breaks from XmlDocument?
When I build XML up from scratch with XmlDocument, the OuterXml property already has everything nicely indented with line breaks. However, if I call LoadXml on some very "compressed" XML (no line breaks or indention) then the output of OuterXml…

Neil C. Obremski
- 18,696
- 24
- 83
- 112
6
votes
1 answer
XmlNode InnerXml vs OuterXml
I've come across a bizarre situation and I'm hoping that someone who understands better than I do can help me to resolve it.
I'm inserting an image into an Xml document such that it can be opened with Microsoft Word. As part of this, I need to add…

user1711233
- 251
- 1
- 8
- 16
1
vote
0 answers
ASP.NET 1.1 - XPathNavigator OuterXml equivalent
I'm working with the Google Maps API to do GeoCode lookups in 1.1 and I'm running into a brick wall with the XPathNavigator object.
I need to create a "sub-navigator" so that we can perform global xpath searches for nodes (e.g.…

Eric Walter
- 875
- 1
- 8
- 17
1
vote
2 answers
System.Xml.XmlDocument, System.Xml.XPath.XPathNavigator{ReplaceSelf,OuterXml}: Replacing Placeholders In Document
I'm currently maintaining a Web application that I wrote about a year or so ago for work. Basically it allows users to create custom XHTML report templates. I use XmlDocument, XPathNavigator, et. al. to validate, sanitize, and substitute…

bambams
- 745
- 1
- 8
- 18
0
votes
2 answers
Automatically format a long outerXml string
I have multiple large XML files and am trying to extract 5 instances of a specific element and its children. I have the code all set, however, I HAVE to use StreamWriter to write out the xml. How can I do this so that it comes out properly indented,…

Gmac
- 169
- 2
- 14
0
votes
2 answers
How can I get only the outer markup of an XML element?
If I have an XmlNode like this
Content
I can get its InnerXml ("Content"), but how can I get the opposite? That is, just the outer markup separated by its opening tag and closing tags:

AxiomaticNexus
- 6,190
- 3
- 41
- 61