Coverting XML to a string
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Coverting XML to a string
Hi Tom,
I'm not sure what you mean by "string". The entire XML content is a string of characters. Maybe you can save it directly as it is.
Do you want to escape characters like "<" and ">"? If you open the XML in the text editing mode, select all, right click and use the action Source->Escape Selection you have various options to escape the XML content there.
Regards,
Radu
I'm not sure what you mean by "string". The entire XML content is a string of characters. Maybe you can save it directly as it is.
Do you want to escape characters like "<" and ">"? If you open the XML in the text editing mode, select all, right click and use the action Source->Escape Selection you have various options to escape the XML content there.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 3
- Joined: Thu Jul 07, 2016 12:20 pm
Re: Coverting XML to a string
Thanks Radu,
To clarify, to want to remove the indent/formatting so that the xml is a single row of text.
Previously, I have used firefox, i.e. copy the formatted xml into the firefox url, then copy from there into notepad or directly into the sql insert statement.
However, for some reason this method has become inconsistent - i.e. whitespace can get removed which makes the xml invalid.
I am not looking for any characters to get removed.
Thanks again,
Tom
To clarify, to want to remove the indent/formatting so that the xml is a single row of text.
Previously, I have used firefox, i.e. copy the formatted xml into the firefox url, then copy from there into notepad or directly into the sql insert statement.
However, for some reason this method has become inconsistent - i.e. whitespace can get removed which makes the xml invalid.
I am not looking for any characters to get removed.
Thanks again,
Tom
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Coverting XML to a string
Hi Tom,
If you select the entire content, you can right click and choose Source->Join and Normalize lines.
But I still do not understand why the database would not allow line breaks in the cell data content.
Regards,
Radu
If you select the entire content, you can right click and choose Source->Join and Normalize lines.
But I still do not understand why the database would not allow line breaks in the cell data content.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 3
- Joined: Thu Jul 07, 2016 12:20 pm
Re: Coverting XML to a string
Radu,
Thanks a lot - this has resolved my issue!
The development resource who is helping me with this has asked for the xml in this format purely to keep the rows tidy and easy to view.
Thanks,
Tom
Thanks a lot - this has resolved my issue!
The development resource who is helping me with this has asked for the xml in this format purely to keep the rows tidy and easy to view.
Thanks,
Tom
Return to “General XML Questions”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service