XMLReader from a string content

前端 未结 2 2029
梦谈多话
梦谈多话 2021-02-01 12:28

I\'m trying to generate XML from another XML using a XslTransform. I get both files (source XML and XSL transformation file) as string content, so I\'m trying to pass the XSL fi

相关标签:
2条回答
  • 2021-02-01 12:54

    XmlReader xmlReader = XmlReader.Create(new StringReader(YourStringValue));

    0 讨论(0)
  • 2021-02-01 13:02

    The StringReader -> XmlReader approach is fine, you should stick to it. The reader reports none because it hasn't been read yet. Try calling Read() on it to see what happens then. The transformation will also call read on it.

    0 讨论(0)
提交回复
热议问题