Stream: implementers
Topic: fhir-net-api pretty print xml serialization
Sean McIlvenna (Jul 17 2017 at 21:00):
Is there a way using fhir-net-api to serialize to XML and have the results be pretty-printed (tabbed)?
Grahame Grieve (Jul 21 2017 at 10:43):
maybe you should ask on the dotnet stream
Richard Kavanagh (Jul 21 2017 at 22:51):
Hi @Sean McIlvenna
The way I do this is as follows:
First, serialise to XML via the API
1) String cc = FhirSerializer.SerializeToXml(_resource);
Then use LINQ to format it
2) var dd = System.Xml.Linq.XElement.Parse(cc).ToString();
That works for me
Last updated: Apr 12 2022 at 19:14 UTC