-
Notifications
You must be signed in to change notification settings - Fork 796
Add helper function to preserve XML declaration as processing instruction #44358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add helper function to preserve XML declaration as processing instruction #44358
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #44358 +/- ##
============================================
- Coverage 75.09% 75.08% -0.01%
- Complexity 58585 58590 +5
============================================
Files 3599 3599
Lines 226340 226383 +43
Branches 29441 29453 +12
============================================
+ Hits 169975 169988 +13
- Misses 46923 46947 +24
- Partials 9442 9448 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
BXml item = XmlUtils.parse("<root>" + value + "</root>"); | ||
return item.children(); | ||
String xml = value.trim(); | ||
if (xml.startsWith(XML_DECLARATION)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't an XML file also start with processing instructions like <?php
or <?mso-application
instead?
if (version != null) { | ||
piData.append("version=\"").append(version).append("\""); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we remove these new lines after each if
Purpose
Fixes #https://github.com/wso2-enterprise/wso2-integration-internal/issues/2231
Approach
Samples
Remarks
Check List