- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Nifi:How to remove xml tag from xml response data?
- Labels:
-
Apache NiFi
Created 09-19-2017 06:37 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to replace <?xml version="1.0" encoding="utf-8"?>
tag by <DailyData></DailyDate>
I used to replace text nifi processor with this search value:^<[^>]+>(.*)<\/\w+>$
and I put replace value like this in replace value <DailyData>$1</DailyData>
but I got error like this inside xml file:
This page contains the following errors:
error on line 1 at column 4081: XML declaration allowed only at the start of the document Below is a rendering of the page up to the first error.
what should I change?
Created on 09-19-2017 08:56 PM - edited 08-17-2019 11:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@sally sally, can you make use of below search property
^<[^>]+>(.*)\<\/\?.*\>$
Replacetext Configs:-
Input:-
<?xml version="1.0" encoding="utf-8"?>abc</?xml version="1.0" encoding="utf-8"?>Output:-
<DailyData>abc</DailyData>
Created on 09-19-2017 08:56 PM - edited 08-17-2019 11:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@sally sally, can you make use of below search property
^<[^>]+>(.*)\<\/\?.*\>$
Replacetext Configs:-
Input:-
<?xml version="1.0" encoding="utf-8"?>abc</?xml version="1.0" encoding="utf-8"?>Output:-
<DailyData>abc</DailyData>
